Skip to contentSkip to conversation

gcc-configure: Enable initfini-array

PATCH In review Saul Wold 2 participants 2 messages Sep 19, 2016 – Sep 20, 2016

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH v2 1/1 gcc-configure: Enable initfini-array

This adds the correct support for initfini-array which replaces .init and .fini with .init-array and .fini-array. There is no appreciable size difference with this change.

The change is needed since configure will not correctly detect support when building cross-compilers.

---
v2: Enable for all Architectures

 meta/recipes-devtools/gcc/gcc-configure-common.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/gcc/gcc-configure-common.inc +4 -0
index f4f76bd..b374c30 100644
@@ -44,6 +44,10 @@ EXTRA_OECONF = "\
     ${@get_gcc_multiarch_setting(bb, d)} \
 "
 
+# Set this here since GCC configure won't auto-detect and enable
+# initfini-arry when cross compiling.
+EXTRA_OECONF_append = " --enable-initfini-array"
+
 export gcc_cv_collect2_libs = 'none required'
 # We need to set gcc_cv_collect2_libs else there is cross-compilation badness
 # in the config.log files (which might not get generated until do_compile
Signature · 1 line
2.5.0
#1 lore raw
Quoted 11 lines · Saul Wold

This adds the correct support for initfini-array which replaces .init and .fini with .init-array and .fini-array. There is no appreciable size difference with this change.

The change is needed since configure will not correctly detect support when building cross-compilers.

---
v2: Enable for all Architectures

What is original motivation for this patch ? this change expects libc to support init fini arrays
please test it on all supported libcs as well.

Quoted 27 lines
 meta/recipes-devtools/gcc/gcc-configure-common.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/gcc/gcc-configure-common.inc +4 -1
index f4f76bd..b374c30 100644
@@ -44,6 +44,10 @@ EXTRA_OECONF = "\
     ${@get_gcc_multiarch_setting(bb, d)} \
 "
 
+# Set this here since GCC configure won't auto-detect and enable
+# initfini-arry when cross compiling.
+EXTRA_OECONF_append = " --enable-initfini-array"
+
 export gcc_cv_collect2_libs = 'none required'
 # We need to set gcc_cv_collect2_libs else there is cross-compilation badness
 # in the config.log files (which might not get generated until do_compile
--

2.5.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core