This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/9744] New: Building gdb/sim/arm/run does not respect the environments LDFLAGS
- From: "rje at crystalfontz dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 14 Jan 2009 21:18:35 -0000
- Subject: [Bug build/9744] New: Building gdb/sim/arm/run does not respect the environments LDFLAGS
- Reply-to: sourceware-bugzilla at sourceware dot org
I've set up my environment on OS X to find some headers and libraries in other
places. I did this as so:
CFLAGS=-I/sw/include -I/usr/local/ftdi/include
LDFLAGS=-L/sw/lib -L/usr/local/ftdi/lib
CXXFLAGS=$(CFLAGS)
CPPFLAGS=$(CXXFLAGS)
When building gdb-6.8 it makes correctly down until the sim/arm directory.
There it is using gcc to link together the "run" executable but it is not using
the LDFLAGS. Without those it cannot find that libintl is in /sw/lib.
gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1
-DDEFAULT_INLINE=0 -DMODET -DNEED_UI_LOOP_HOOK -DSIM_TARGET_SWITCHES
-I. -I../../../../gdb/sim/arm -I../common -I../../../../gdb/sim/arm/../common
-I../../include -I../../../../gdb/sim/arm/../../include -I../../bfd
-I../../../../gdb/sim/arm/../../bfd -I../../opcodes
-I../../../../gdb/sim/arm/../../opcodes -I/sw/include -I/usr/local/ftdi/include
-o run \
run.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a -lintl
-liconv -lc ../../libiberty/libiberty.a
ld: library not found for -lintl
collect2: ld returned 1 exit status
make[5]: *** [run] Error 1
make[4]: *** [all] Error 1
make[3]: *** [all-sim] Error 2
make[2]: *** [all] Error 2
make[1]: *** [cross-gdb] Error 2
make: *** [tools] Error 2
I can work around this by modifying the generated Makefile in sim/arm and adding
the -L/sw/lib to this block.
run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
$(CC) -L/sw/lib $(ALL_CFLAGS) -o run$(EXEEXT) \
$(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
I'm not sure how to patch it correctly in the configure scripts to pass the
LDFLAGS and have the generated Makefile respect them.
--
Summary: Building gdb/sim/arm/run does not respect the
environments LDFLAGS
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
AssignedTo: unassigned at sourceware dot org
ReportedBy: rje at crystalfontz dot com
CC: gdb-prs at sourceware dot org
GCC build triplet: i386-apple-darwin9.6.0
GCC host triplet: i386-apple-darwin9.6.0
GCC target triplet: arm-unknown-eabi
http://sourceware.org/bugzilla/show_bug.cgi?id=9744
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.