patches/gcc/4.6.4/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@3210
     1
Highly inspired by:
yann@3210
     2
  http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
yann@3210
     3
yann@3210
     4
diff -durN gcc-4.6.0.orig/libgcc/Makefile.in gcc-4.6.0/libgcc/Makefile.in
yann@3210
     5
--- gcc-4.6.0.orig/libgcc/Makefile.in	2011-01-26 05:19:58.000000000 +0100
yann@3210
     6
+++ gcc-4.6.0/libgcc/Makefile.in	2011-09-12 18:17:12.743718974 +0200
yann@3210
     7
@@ -772,8 +772,9 @@
yann@3210
     8
 libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
yann@3210
     9
 endif
yann@3210
    10
 
yann@3210
    11
+all: libgcc_eh.a
yann@3210
    12
 ifeq ($(enable_shared),yes)
yann@3210
    13
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
yann@3210
    14
+all: libgcc_s$(SHLIB_EXT)
yann@3210
    15
 ifneq ($(LIBUNWIND),)
yann@3210
    16
 all: libunwind$(SHLIB_EXT)
yann@3210
    17
 endif
yann@3210
    18
@@ -950,10 +951,6 @@
yann@3210
    19
 install-shared:
yann@3210
    20
 	$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
yann@3210
    21
 
yann@3210
    22
-	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@3210
    23
-	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@3210
    24
-	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@3210
    25
-
yann@3210
    26
 	$(subst @multilib_dir@,$(MULTIDIR),$(subst \
yann@3210
    27
 		@shlib_base_name@,libgcc_s,$(subst \
yann@3210
    28
 		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
yann@3210
    29
@@ -968,6 +965,10 @@
yann@3210
    30
 	chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a
yann@3210
    31
 	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
yann@3210
    32
 
yann@3210
    33
+	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@3210
    34
+	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@3210
    35
+	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@3210
    36
+
yann@3210
    37
 	parts="$(INSTALL_PARTS)";				\
yann@3210
    38
 	for file in $$parts; do					\
yann@3210
    39
 	  rm -f $(DESTDIR)$(inst_libdir)/$$file;		\