This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Eliminate duplicate libiberty when linking gnatbind
- From: Matt Kraai <kraai at alumni dot cmu dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 May 2003 17:22:19 -0700
- Subject: Eliminate duplicate libiberty when linking gnatbind
Howdy,
When linking gnatbind, libiberty is include twice on the link
line:
gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H -o gnatbind ada/b_gnatb.o ada/link.o ada/ada.o ada/adaint.o ada/cstreams.o ada/cio.o ada/ali.o ada/ali-util.o ada/alloc.o ada/a-tags.o ada/a-stream.o ada/bcheck.o ada/binde.o ada/binderr.o ada/bindgen.o ada/bindusg.o ada/butil.o ada/casing.o ada/csets.o ada/debug.o ada/fname.o ada/gnat.o ada/g-hesora.o ada/g-htable.o ada/g-os_lib.o ada/s-crc32.o ada/fmap.o ada/gnatbind.o ada/gnatvsn.o ada/hostparm.o ada/krunch.o ada/namet.o ada/opt.o ada/osint.o ada/osint-b.o ada/output.o ada/rident.o ada/s-assert.o ada/s-parame.o ada/s-sopco3.o ada/s-sopco4.o ada/s-sopco5.o ada/s-stache.o ada/s-stalib.o ada/s-stoele.o ada/s-imgenu.o ada/s-strops.o ada/s-soflin.o ada/s-wchcon.o ada/s-wchjis.o ada/sdefault.o ada/switch.o ada/switch-b.o ada/stylesw.o ada/validsw.o ada/system.o ada/table.o ada/tree_io.o ada/types.o ada/widechar.o ada/raise.o ada/exit.o ada/argv.o ada/init.o ada/adafinal.o ada/s-wchcnv.o ada/s-exctab.o ada/a-except.o ada/s-memory.o ada/s-traceb.o ada/tracebak.o ada/s-mastop.o ada/s-except.o ada/s-secsta.o ada/atree.o ada/scans.o ada/einfo.o ada/sinfo.o ada/scn.o ada/sinput.o ada/sinput-l.o ada/targparm.o ada/errout.o ada/style.o ada/stand.o ada/lib.o ada/uintp.o ada/elists.o ada/nlists.o ada/stringt.o ada/snames.o ada/uname.o ada/urealp.o prefix.o version.o \
../libiberty/libiberty.a ../libiberty/libiberty.a
Since it is already included in $(LIBS), there is no need to
explicitly link against it.
The following patch removes the duplicate. It was bootstrapped
and regression tested on powerpc-unknown-linux-gnu.
OK to commit?
--
Matt Kraai <kraai@alumni.cmu.edu>
Debian GNU/Linux Peon
* Make-lang.in (gnatbind): Remove $(LIBIBERTY).
Index: gcc/ada/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.29
diff -3 -c -p -r1.29 Make-lang.in
*** gcc/ada/Make-lang.in 20 Mar 2003 03:11:25 -0000 1.29
--- gcc/ada/Make-lang.in 31 May 2003 00:15:26 -0000
*************** gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNA
*** 210,216 ****
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) \
! $(LIBIBERTY) $(LIBS) $(SYSLIBS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force
--- 210,216 ----
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) \
! $(LIBS) $(SYSLIBS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force