Jack Howarth <howa...@bromo.med.uc.edu> writes: > Why aren't the BOOT_LDFLAGS settings honored outside of the gcc build > subdirectory? > On darwin, we are now setting... > > BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; > esac;` > > in config/mh-darwin, and while the generated toplevel Makefile shows... > > LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \ > > for POSTSTAGE1_HOST_EXPORTS, this doesn't seem to allow the BOOT_LDFLAGS flags > to travel into any of the builds for libjava, etc in > x86_64-apple-darwin11.0.0. > The Makefiles in those subdirectories all show... > > LDFLAGS = > > such that the -Wl,-no_pie set by BOOT_LDFLAGS is lost. Is this intentional and > how can it be fixed or worked around to honor BOOT_LDFLAGS in all of the > library > builds?
BOOT_LDFLAGS sets the LDFLAGS value to use for stage2 and stage3 host programs. libjava is not a host program, it is a target library. To set LDFLAGS for building libjava, you need to set LDFLAGS_FOR_TARGET at the top level. When running configure and make for a target library like libjava, the top level LDFLAGS_FOR_TARGET will be passed as LDFLAGS. Ian