patches/gcc/4.6.0/100-libgcc_eh.a.patch
author Cody Schafer <dev@codyps.com>
Fri May 09 19:13:49 2014 -0700 (2014-05-09)
changeset 3312 4876ff97e039
permissions -rw-r--r--
cc/gcc: allow CC_EXTRA_CONFIG_ARRAY on baremetal

The final bare-metal compiler is built using the core backend.
Currently the core uses the CC_CORE_EXTRA_CONFIG_ARRAY variable.

While this works as supposed to, this can leave the user puzzled
in the menuconfig, since all he can see is the core options, not
the final options.

Only show the core options if any of the core passes are needed,
and use the final options in the core-backend if we're issuing
the bare-metal compiler.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: hide core options if no core pass needed;
use final option in core backend if issuing the bare-metal compiler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <22181e546ba746202489.1399688067@localhost>
Patchwork-Id: 347586
yann@2672
     1
Highly inspired by:
yann@2672
     2
  http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
yann@2672
     3
yann@2672
     4
diff -durN gcc-4.6.0.orig/libgcc/Makefile.in gcc-4.6.0/libgcc/Makefile.in
yann@2672
     5
--- gcc-4.6.0.orig/libgcc/Makefile.in	2011-01-26 05:19:58.000000000 +0100
yann@2672
     6
+++ gcc-4.6.0/libgcc/Makefile.in	2011-09-12 18:17:12.743718974 +0200
yann@2672
     7
@@ -772,8 +772,9 @@
yann@2672
     8
 libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
yann@2672
     9
 endif
yann@2672
    10
 
yann@2672
    11
+all: libgcc_eh.a
yann@2672
    12
 ifeq ($(enable_shared),yes)
yann@2672
    13
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
yann@2672
    14
+all: libgcc_s$(SHLIB_EXT)
yann@2672
    15
 ifneq ($(LIBUNWIND),)
yann@2672
    16
 all: libunwind$(SHLIB_EXT)
yann@2672
    17
 endif
yann@2672
    18
@@ -950,10 +951,6 @@
yann@2672
    19
 install-shared:
yann@2672
    20
 	$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
yann@2672
    21
 
yann@2672
    22
-	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@2672
    23
-	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    24
-	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    25
-
yann@2672
    26
 	$(subst @multilib_dir@,$(MULTIDIR),$(subst \
yann@2672
    27
 		@shlib_base_name@,libgcc_s,$(subst \
yann@2672
    28
 		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
yann@2672
    29
@@ -968,6 +965,10 @@
yann@2672
    30
 	chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a
yann@2672
    31
 	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
yann@2672
    32
 
yann@2672
    33
+	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@2672
    34
+	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    35
+	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    36
+
yann@2672
    37
 	parts="$(INSTALL_PARTS)";				\
yann@2672
    38
 	for file in $$parts; do					\
yann@2672
    39
 	  rm -f $(DESTDIR)$(inst_libdir)/$$file;		\