* [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER
@ 2011-08-02 22:33 Kumar Gala
2011-08-02 23:15 ` Khem Raj
2011-08-03 16:47 ` Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Kumar Gala @ 2011-08-02 22:33 UTC (permalink / raw)
To: openembedded-core
The sed regex in do_configure_prepend was producing the following result:
#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "/lib64/ld-linux-x86-64.so.2"
instead of removing the leading "/lib" or "/lib64".
Now we have it do:
#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
Additionally, with the regex fixed the manipulation of SYSTEMLIBS_DIR
needs to be removed.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
* cleanup regex so we dont add in / explicity but just pull it in from
how SYSTEMLIBS_DIR is set.
meta/recipes-devtools/gcc/gcc-4.6.inc | 2 +-
meta/recipes-devtools/gcc/gcc-configure-common.inc | 12 ++++++++----
meta/recipes-devtools/gcc/gcc_4.5.1.bb | 2 +-
meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index b054266..3a6f273 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
require gcc-common.inc
-PR = "r3"
+PR = "r4"
# Third digit in PV should be incremented after a minor release
# happens from this branch on gcc e.g. currently its 4.6.0
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index aac6d69..238496f 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -66,11 +66,15 @@ SYSTEMLIBS1 = "${target_libdir}/"
do_configure_prepend () {
# Change the default dynamic linker path, only useful for SDK, other's value
# are not changed according to the SYSTEMLIBS_DIR
+ #
+ # We want something like the following:
+ # #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+ # becomes
+ # #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
+ #
sed -i ${S}/gcc/config/*/linux*.h -e \
- 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
+ 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
- SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
- [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
# teach gcc to find correct target includedir when checking libc ssp support
mkdir -p ${B}/gcc
echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
@@ -85,7 +89,7 @@ do_configure_prepend () {
#ifndef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
#endif
-#define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
+#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
#endif /* ! GCC_DEFAULTS_H */
_EOF
mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
diff --git a/meta/recipes-devtools/gcc/gcc_4.5.1.bb b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
index f036cb1..75901ba 100644
--- a/meta/recipes-devtools/gcc/gcc_4.5.1.bb
+++ b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "r9"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
diff --git a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
index 9fd2b0a..1bbab50 100644
--- a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
+++ b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
require gcc-${PV}.inc
require gcc-configure-target.inc
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER
2011-08-02 22:33 [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER Kumar Gala
@ 2011-08-02 23:15 ` Khem Raj
2011-08-03 16:47 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2011-08-02 23:15 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, Aug 2, 2011 at 3:33 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
> The sed regex in do_configure_prepend was producing the following result:
>
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "/lib64/ld-linux-x86-64.so.2"
>
> instead of removing the leading "/lib" or "/lib64".
>
> Now we have it do:
>
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
>
> Additionally, with the regex fixed the manipulation of SYSTEMLIBS_DIR
> needs to be removed.
its better one.
Doesn't apply cleanly but I have fixed that. I am testing this on x86_64
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> * cleanup regex so we dont add in / explicity but just pull it in from
> how SYSTEMLIBS_DIR is set.
>
> meta/recipes-devtools/gcc/gcc-4.6.inc | 2 +-
> meta/recipes-devtools/gcc/gcc-configure-common.inc | 12 ++++++++----
> meta/recipes-devtools/gcc/gcc_4.5.1.bb | 2 +-
> meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb | 2 +-
> 4 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
> index b054266..3a6f273 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.6.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
> @@ -1,6 +1,6 @@
> require gcc-common.inc
>
> -PR = "r3"
> +PR = "r4"
>
> # Third digit in PV should be incremented after a minor release
> # happens from this branch on gcc e.g. currently its 4.6.0
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index aac6d69..238496f 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -66,11 +66,15 @@ SYSTEMLIBS1 = "${target_libdir}/"
> do_configure_prepend () {
> # Change the default dynamic linker path, only useful for SDK, other's value
> # are not changed according to the SYSTEMLIBS_DIR
> + #
> + # We want something like the following:
> + # #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
> + # becomes
> + # #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
> + #
> sed -i ${S}/gcc/config/*/linux*.h -e \
> - 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
> + 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
>
> - SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
> - [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
> # teach gcc to find correct target includedir when checking libc ssp support
> mkdir -p ${B}/gcc
> echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
> @@ -85,7 +89,7 @@ do_configure_prepend () {
> #ifndef STANDARD_STARTFILE_PREFIX_2
> #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
> #endif
> -#define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
> +#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
> #endif /* ! GCC_DEFAULTS_H */
> _EOF
> mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
> diff --git a/meta/recipes-devtools/gcc/gcc_4.5.1.bb b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
> index f036cb1..75901ba 100644
> --- a/meta/recipes-devtools/gcc/gcc_4.5.1.bb
> +++ b/meta/recipes-devtools/gcc/gcc_4.5.1.bb
> @@ -1,4 +1,4 @@
> -PR = "r8"
> +PR = "r9"
> require gcc-${PV}.inc
> require gcc-configure-target.inc
> require gcc-package-target.inc
> diff --git a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
> index 9fd2b0a..1bbab50 100644
> --- a/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
> +++ b/meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
> @@ -1,4 +1,4 @@
> -PR = "r5"
> +PR = "r6"
>
> require gcc-${PV}.inc
> require gcc-configure-target.inc
> --
> 1.7.3.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER
2011-08-02 22:33 [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER Kumar Gala
2011-08-02 23:15 ` Khem Raj
@ 2011-08-03 16:47 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-08-03 16:47 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-08-02 at 17:33 -0500, Kumar Gala wrote:
> The sed regex in do_configure_prepend was producing the following result:
>
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "/lib64/ld-linux-x86-64.so.2"
>
> instead of removing the leading "/lib" or "/lib64".
>
> Now we have it do:
>
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
>
> Additionally, with the regex fixed the manipulation of SYSTEMLIBS_DIR
> needs to be removed.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-03 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 22:33 [PATCH v2] gcc: Fix setting of GLIBC_DYNAMIC_LINKER Kumar Gala
2011-08-02 23:15 ` Khem Raj
2011-08-03 16:47 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox