build libgcc*.a a little more compact by removing excess local symbols
Obtained from: bde
This commit is contained in:
parent
24501dd0c6
commit
864252eaad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18344
@ -245,7 +245,7 @@ LIBGCC2 = libgcc2.a
|
||||
# -g1 causes output of debug info only for file-scope entities.
|
||||
# we use this here because that should be enough, and also
|
||||
# so that -g1 will be tested.
|
||||
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1
|
||||
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1 -g0
|
||||
|
||||
# Additional options to use when compiling libgcc2.a.
|
||||
# Some targets override this to -Iinclude
|
||||
@ -746,6 +746,7 @@ libgcc1.conv: libgcc1.a
|
||||
libgcc1.null: $(GCC_PASSES)
|
||||
echo "__foo () {}" > dummy.c
|
||||
$(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
|
||||
ld -r -x dummy$(objext); mv a.out dummy$(objext)
|
||||
$(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
|
||||
rm -f dummy$(objext) dummy.c
|
||||
|
||||
@ -777,6 +778,7 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
|
||||
$(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
mv libgcc1$(objext) $${name}$(objext); \
|
||||
ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
|
||||
$(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
|
||||
rm -f $${name}$(objext); \
|
||||
done
|
||||
@ -796,6 +798,7 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
|
||||
else true; fi; \
|
||||
$(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
|
||||
$(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
rm -f $${name}.s $${name}$(objext); \
|
||||
@ -825,6 +828,7 @@ libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
mv libgcc1$(objext) $${name}$(objext); \
|
||||
ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
|
||||
$(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
|
||||
rm -f $${name}$(objext); \
|
||||
done
|
||||
@ -875,6 +879,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
|
||||
$(srcdir)/libgcc2.c -o $${name}$(objext); \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
ld -r -x $${name}$(objext); mv a.out $${name}$(objext); \
|
||||
$(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
|
||||
rm -f $${name}$(objext); \
|
||||
done
|
||||
@ -895,6 +900,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
|
||||
else true; fi; \
|
||||
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
|
||||
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
|
||||
ld -r -x $${oname}$(objext); mv a.out $${oname}$(objext); \
|
||||
$(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
|
||||
rm -f $${name}.s $${oname}$(objext); \
|
||||
else true; \
|
||||
|
Loading…
Reference in New Issue
Block a user