* help with gcc-configure-common bug
@ 2011-08-01 18:58 Kumar Gala
2011-08-02 15:36 ` Kumar Gala
2011-08-02 15:51 ` Kumar Gala
0 siblings, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2011-08-01 18:58 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
I'm trying to track down a bug related the following in gcc-configure-common.inc. I know there is one bug in the sed line, but when I fix that I run into a second issue. I'm trying to understand what we think the following two lines are trying to attempt:
SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
[ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
any ideas?
From the commit log we expect something like:
#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2"
and we define SYSTEMLIBS_DIR in defaults.h.
so its seems if SYSTEMLIBS = 'lib', that we end up with:
#define SYSTEMLIBS ""
and thus becomes:
GLIBC_DYNAMIC_LINKER64 "ld-linux-x86-64.so.2"
which ends up being wrong.
- k
do_configure_prepend () {
# Change the default dynamic linker path, only useful for SDK, other's value
# are not changed according to the SYSTEMLIBS_DIR
sed -i ${S}/gcc/config/*/linux*.h -e \
's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
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
cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
cat >>${B}/gcc/defaults.h.new <<_EOF
#ifndef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_1
#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
#endif
#define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
#endif /* ! GCC_DEFAULTS_H */
_EOF
mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
}
- k
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: help with gcc-configure-common bug
2011-08-01 18:58 help with gcc-configure-common bug Kumar Gala
@ 2011-08-02 15:36 ` Kumar Gala
2011-08-02 15:41 ` Phil Blundell
2011-08-03 12:25 ` Richard Purdie
2011-08-02 15:51 ` Kumar Gala
1 sibling, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2011-08-02 15:36 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Aug 1, 2011, at 1:58 PM, Kumar Gala wrote:
> I'm trying to track down a bug related the following in gcc-configure-common.inc. I know there is one bug in the sed line, but when I fix that I run into a second issue. I'm trying to understand what we think the following two lines are trying to attempt:
>
> SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
> [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
>
> any ideas?
>
>> From the commit log we expect something like:
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2"
> and we define SYSTEMLIBS_DIR in defaults.h.
>
> so its seems if SYSTEMLIBS = 'lib', that we end up with:
> #define SYSTEMLIBS ""
>
> and thus becomes:
> GLIBC_DYNAMIC_LINKER64 "ld-linux-x86-64.so.2"
>
> which ends up being wrong.
>
> - k
>
> do_configure_prepend () {
> # Change the default dynamic linker path, only useful for SDK, other's value
> # are not changed according to the SYSTEMLIBS_DIR
> sed -i ${S}/gcc/config/*/linux*.h -e \
> 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
>
> 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
> cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
> cat >>${B}/gcc/defaults.h.new <<_EOF
> #ifndef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
> #endif
> #ifndef STANDARD_STARTFILE_PREFIX_1
> #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
> #endif
> #ifndef STANDARD_STARTFILE_PREFIX_2
> #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
> #endif
> #define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
> #endif /* ! GCC_DEFAULTS_H */
> _EOF
> mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
> }
Would really love if anyone knows what is suppose to be going on with SYSTEMLIBS_DIR to chime in here.
- k
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: help with gcc-configure-common bug
2011-08-02 15:36 ` Kumar Gala
@ 2011-08-02 15:41 ` Phil Blundell
2011-08-02 15:51 ` Kumar Gala
2011-08-03 12:25 ` Richard Purdie
1 sibling, 1 reply; 8+ messages in thread
From: Phil Blundell @ 2011-08-02 15:41 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-08-02 at 10:36 -0500, Kumar Gala wrote:
> Would really love if anyone knows what is suppose to be going on with SYSTEMLIBS_DIR to chime in here.
That stuff was all added in 934d3853 as part of the source tree sharing
work. So I guess you should take it up with Robert Yang.
p.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: help with gcc-configure-common bug
2011-08-02 15:36 ` Kumar Gala
2011-08-02 15:41 ` Phil Blundell
@ 2011-08-03 12:25 ` Richard Purdie
2011-08-03 12:50 ` Kumar Gala
1 sibling, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2011-08-03 12:25 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-08-02 at 10:36 -0500, Kumar Gala wrote:
> On Aug 1, 2011, at 1:58 PM, Kumar Gala wrote:
>
> > I'm trying to track down a bug related the following in gcc-configure-common.inc. I know there is one bug in the sed line, but when I fix that I run into a second issue. I'm trying to understand what we think the following two lines are trying to attempt:
> >
> > SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
> > [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
> >
> > any ideas?
> >
> >> From the commit log we expect something like:
> > #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2"
> > and we define SYSTEMLIBS_DIR in defaults.h.
> >
> > so its seems if SYSTEMLIBS = 'lib', that we end up with:
> > #define SYSTEMLIBS ""
> >
> > and thus becomes:
> > GLIBC_DYNAMIC_LINKER64 "ld-linux-x86-64.so.2"
> >
> > which ends up being wrong.
> >
> > - k
> >
> > do_configure_prepend () {
> > # Change the default dynamic linker path, only useful for SDK, other's value
> > # are not changed according to the SYSTEMLIBS_DIR
> > sed -i ${S}/gcc/config/*/linux*.h -e \
> > 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
> >
> > 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
> > cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
> > cat >>${B}/gcc/defaults.h.new <<_EOF
> > #ifndef STANDARD_INCLUDE_DIR
> > #define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
> > #endif
> > #ifndef STANDARD_STARTFILE_PREFIX_1
> > #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
> > #endif
> > #ifndef STANDARD_STARTFILE_PREFIX_2
> > #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
> > #endif
> > #define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
> > #endif /* ! GCC_DEFAULTS_H */
> > _EOF
> > mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
> > }
>
> Would really love if anyone knows what is suppose to be going on with SYSTEMLIBS_DIR to chime in here.
Ah, I can help here :)
We only have one gcc source checkout with the shared work directory.
Each multilib (or sdk build) needs to customise SYSTEMLIBS depending on
its configuration. This is why its being done in the defaults.h file in
${B} instead of files in ${S}.
We likely should do the substitutions in ${S} at unpack time to make
this clearer.
Cheers,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: help with gcc-configure-common bug
2011-08-03 12:25 ` Richard Purdie
@ 2011-08-03 12:50 ` Kumar Gala
2011-08-03 15:53 ` Khem Raj
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2011-08-03 12:50 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Aug 3, 2011, at 7:25 AM, Richard Purdie wrote:
> On Tue, 2011-08-02 at 10:36 -0500, Kumar Gala wrote:
>> On Aug 1, 2011, at 1:58 PM, Kumar Gala wrote:
>>
>>> I'm trying to track down a bug related the following in gcc-configure-common.inc. I know there is one bug in the sed line, but when I fix that I run into a second issue. I'm trying to understand what we think the following two lines are trying to attempt:
>>>
>>> SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
>>> [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
>>>
>>> any ideas?
>>>
>>>> From the commit log we expect something like:
>>> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2"
>>> and we define SYSTEMLIBS_DIR in defaults.h.
>>>
>>> so its seems if SYSTEMLIBS = 'lib', that we end up with:
>>> #define SYSTEMLIBS ""
>>>
>>> and thus becomes:
>>> GLIBC_DYNAMIC_LINKER64 "ld-linux-x86-64.so.2"
>>>
>>> which ends up being wrong.
>>>
>>> - k
>>>
>>> do_configure_prepend () {
>>> # Change the default dynamic linker path, only useful for SDK, other's value
>>> # are not changed according to the SYSTEMLIBS_DIR
>>> sed -i ${S}/gcc/config/*/linux*.h -e \
>>> 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
>>>
>>> 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
>>> cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
>>> cat >>${B}/gcc/defaults.h.new <<_EOF
>>> #ifndef STANDARD_INCLUDE_DIR
>>> #define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
>>> #endif
>>> #ifndef STANDARD_STARTFILE_PREFIX_1
>>> #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
>>> #endif
>>> #ifndef STANDARD_STARTFILE_PREFIX_2
>>> #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
>>> #endif
>>> #define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
>>> #endif /* ! GCC_DEFAULTS_H */
>>> _EOF
>>> mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
>>> }
>>
>> Would really love if anyone knows what is suppose to be going on with SYSTEMLIBS_DIR to chime in here.
>
> Ah, I can help here :)
>
> We only have one gcc source checkout with the shared work directory.
> Each multilib (or sdk build) needs to customise SYSTEMLIBS depending on
> its configuration. This is why its being done in the defaults.h file in
> ${B} instead of files in ${S}.
>
> We likely should do the substitutions in ${S} at unpack time to make
> this clearer.
>
> Cheers,
>
> Richard
>
Post some patches to address this, so take a look.
- k
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: help with gcc-configure-common bug
2011-08-03 12:50 ` Kumar Gala
@ 2011-08-03 15:53 ` Khem Raj
0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2011-08-03 15:53 UTC (permalink / raw)
To: openembedded-core
On 08/03/2011 05:50 AM, Kumar Gala wrote:
>> Ah, I can help here:)
>> >
>> > We only have one gcc source checkout with the shared work directory.
>> > Each multilib (or sdk build) needs to customise SYSTEMLIBS depending on
>> > its configuration. This is why its being done in the defaults.h file in
>> > ${B} instead of files in ${S}.
>> >
>> > We likely should do the substitutions in ${S} at unpack time to make
>> > this clearer.
>> >
>> > Cheers,
>> >
>> > Richard
>> >
> Post some patches to address this, so take a look.
>
I have reposted the same patch after testing. I can now boot x86_64 qemu
and all other qemu sato-images build fine too. Here is the reposted patch.
http://patches.openembedded.org/patch/9131/
Thanks
-Khem
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: help with gcc-configure-common bug
2011-08-01 18:58 help with gcc-configure-common bug Kumar Gala
2011-08-02 15:36 ` Kumar Gala
@ 2011-08-02 15:51 ` Kumar Gala
1 sibling, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2011-08-02 15:51 UTC (permalink / raw)
To: liezhi.yang; +Cc: Patches and discussions about the oe-core layer
On Aug 1, 2011, at 1:58 PM, Kumar Gala wrote:
> I'm trying to track down a bug related the following in gcc-configure-common.inc. I know there is one bug in the sed line, but when I fix that I run into a second issue. I'm trying to understand what we think the following two lines are trying to attempt:
>
> SYSTEMLIBS_DIR=`dirname ${SYSTEMLIBS}`
> [ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
>
> any ideas?
>
>> From the commit log we expect something like:
> #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR"/ld-linux-x86-64.so.2"
> and we define SYSTEMLIBS_DIR in defaults.h.
>
> so its seems if SYSTEMLIBS = 'lib', that we end up with:
> #define SYSTEMLIBS ""
>
> and thus becomes:
> GLIBC_DYNAMIC_LINKER64 "ld-linux-x86-64.so.2"
>
> which ends up being wrong.
>
> - k
>
> do_configure_prepend () {
> # Change the default dynamic linker path, only useful for SDK, other's value
> # are not changed according to the SYSTEMLIBS_DIR
> sed -i ${S}/gcc/config/*/linux*.h -e \
> 's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
>
> 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
> cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
> cat >>${B}/gcc/defaults.h.new <<_EOF
> #ifndef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
> #endif
> #ifndef STANDARD_STARTFILE_PREFIX_1
> #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
> #endif
> #ifndef STANDARD_STARTFILE_PREFIX_2
> #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
> #endif
> #define SYSTEMLIBS_DIR "$SYSTEMLIBS_DIR"
> #endif /* ! GCC_DEFAULTS_H */
> _EOF
> mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
> }
Robert,
Any comments on what you are trying to accomplish with:
[ "$SYSTEMLIBS_DIR" = "/" ] && SYSTEMLIBS_DIR=""
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-03 15:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-01 18:58 help with gcc-configure-common bug Kumar Gala
2011-08-02 15:36 ` Kumar Gala
2011-08-02 15:41 ` Phil Blundell
2011-08-02 15:51 ` Kumar Gala
2011-08-03 12:25 ` Richard Purdie
2011-08-03 12:50 ` Kumar Gala
2011-08-03 15:53 ` Khem Raj
2011-08-02 15:51 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox