diff options
Diffstat (limited to 'recipes-devtools/gcc')
5 files changed, 172 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.6.bb b/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.6.bb new file mode 100644 index 00000000..09414077 --- /dev/null +++ b/recipes-devtools/gcc/gcc-crosssdk-initial_linaro-4.6.bb @@ -0,0 +1,2 @@ +require gcc-cross-initial_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk-initial.inc diff --git a/recipes-devtools/gcc/gcc-crosssdk-intermediate_linaro-4.6.bb b/recipes-devtools/gcc/gcc-crosssdk-intermediate_linaro-4.6.bb new file mode 100644 index 00000000..58b81a8a --- /dev/null +++ b/recipes-devtools/gcc/gcc-crosssdk-intermediate_linaro-4.6.bb @@ -0,0 +1,2 @@ +require gcc-cross-intermediate_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk-intermediate.inc diff --git a/recipes-devtools/gcc/gcc-crosssdk_linaro-4.6.bb b/recipes-devtools/gcc/gcc-crosssdk_linaro-4.6.bb new file mode 100644 index 00000000..e3122166 --- /dev/null +++ b/recipes-devtools/gcc/gcc-crosssdk_linaro-4.6.bb @@ -0,0 +1,2 @@ +require gcc-cross_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk.inc diff --git a/recipes-devtools/gcc/gcc-linaro-4.6/optional_libstdc.patch b/recipes-devtools/gcc/gcc-linaro-4.6/optional_libstdc.patch new file mode 100644 index 00000000..fe157a89 --- /dev/null +++ b/recipes-devtools/gcc/gcc-linaro-4.6/optional_libstdc.patch @@ -0,0 +1,86 @@ +Upstream-Status: Inappropriate [embedded specific] + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Index: gcc-4.6.0/gcc/cp/g++spec.c +=================================================================== +--- gcc-4.6.0.orig/gcc/cp/g++spec.c ++++ gcc-4.6.0/gcc/cp/g++spec.c +@@ -127,6 +127,7 @@ lang_specific_driver (struct cl_decoded_ + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +Index: gcc-4.6.0/gcc/doc/invoke.texi +=================================================================== +--- gcc-4.6.0.orig/gcc/doc/invoke.texi ++++ gcc-4.6.0/gcc/doc/invoke.texi +@@ -193,7 +193,7 @@ in the following sections. + -fno-pretty-templates @gol + -frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol + -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol +--fno-default-inline -fvisibility-inlines-hidden @gol ++-nostdlib++ -fno-default-inline -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol + -Wabi -Wconversion-null -Wctor-dtor-privacy @gol + -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol +@@ -431,7 +431,7 @@ Objective-C and Objective-C++ Dialects}. + @gccoptlist{@var{object-file-name} -l@var{library} @gol + -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol + -s -static -static-libgcc -static-libstdc++ -shared @gol +--shared-libgcc -symbolic @gol ++-shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol}} + +@@ -9069,6 +9069,11 @@ These entries are usually resolved by en + libc. These entry points should be supplied through some other + mechanism when this option is specified. + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ + @cindex @option{-lgcc}, use with @option{-nostdlib} + @cindex @option{-nostdlib} and unresolved references + @cindex unresolved references and @option{-nostdlib} +Index: gcc-4.6.0/gcc/c-family/c.opt +=================================================================== +--- gcc-4.6.0.orig/gcc/c-family/c.opt ++++ gcc-4.6.0/gcc/c-family/c.opt +@@ -1111,6 +1111,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++ + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +Index: gcc-4.6.0/gcc/gcc.c +=================================================================== +--- gcc-4.6.0.orig/gcc/gcc.c ++++ gcc-4.6.0/gcc/gcc.c +@@ -666,6 +666,7 @@ proper position among the other output f + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" + #endif + diff --git a/recipes-devtools/gcc/gcc-linaro-4.6/use-defaults.h-and-t-oe-in-B.patch b/recipes-devtools/gcc/gcc-linaro-4.6/use-defaults.h-and-t-oe-in-B.patch new file mode 100644 index 00000000..b4351ee7 --- /dev/null +++ b/recipes-devtools/gcc/gcc-linaro-4.6/use-defaults.h-and-t-oe-in-B.patch @@ -0,0 +1,80 @@ +Upstream-Status: Pending + +Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that +the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. +--- + gcc/Makefile.in | 2 +- + gcc/configure | 4 ++-- + gcc/configure.ac | 4 ++-- + gcc/mkconfig.sh | 4 ++-- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 7790915..3a0c34a 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -463,7 +463,7 @@ LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] + TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ + + xmake_file=@xmake_file@ +-tmake_file=@tmake_file@ ++tmake_file=@tmake_file@ ./t-oe + TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ + TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ + TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ +diff --git a/gcc/configure b/gcc/configure +index 82fa3e4..d4711b5 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -11227,8 +11227,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 844d8da..a960343 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1628,8 +1628,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh +index d56df8c..875d0f1 100644 +--- a/gcc/mkconfig.sh ++++ b/gcc/mkconfig.sh +@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then + if [ $# -ge 1 ]; then + echo '#ifdef IN_GCC' >> ${output}T + for file in "$@"; do +- if test x"$file" = x"defaults.h"; then ++ if test x"$file" = x"./defaults.h"; then + postpone_defaults_h="yes" + else + echo "# include \"$file\"" >> ${output}T +@@ -103,7 +103,7 @@ esac + + # If we postponed including defaults.h, add the #include now. + if test x"$postpone_defaults_h" = x"yes"; then +- echo "# include \"defaults.h\"" >> ${output}T ++ echo "# include \"./defaults.h\"" >> ${output}T + fi + + # Add multiple inclusion protection guard, part two. +-- +1.7.1 + |