All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option
Date: Tue, 20 Dec 2011 17:15:04 +0100	[thread overview]
Message-ID: <20111220161504.GA12791@jama.jama.net> (raw)
In-Reply-To: <20111220093733.GD3946@jama.jama.net>

[-- Attachment #1: Type: text/plain, Size: 13756 bytes --]

On Tue, Dec 20, 2011 at 10:37:34AM +0100, Martin Jansa wrote:
> On Tue, Dec 20, 2011 at 10:07:56AM +0100, Martin Jansa wrote:
> > On Fri, Dec 16, 2011 at 01:24:24PM -0800, Khem Raj wrote:
> > > On (15/12/11 12:16), Richard Purdie wrote:
> > > > On Wed, 2011-12-14 at 07:49 -0800, Khem Raj wrote:
> > > > > On Wed, Dec 14, 2011 at 2:02 AM, Richard Purdie
> > > > > <richard.purdie@linuxfoundation.org> wrote:
> > > > > > Hi Khem,
> > > > > >
> > > > > > What's puzzling me is that reading through this patch, we already do
> > > > > > what this patch is doing?
> > > > > >
> > > > > > Where is the difference which this patch is fixing?
> > > > > >
> > > > > 
> > > > > this does essentially what we were doing earlier but this one is going
> > > > > to go upstream
> > > > 
> > > > Yes, that is good and I'm fine with the patch for that reason.
> > > 
> > > there is additional detail that this patch does which is that in order
> > > to make gxx-includes to be sysroot relative --with-cxx-include option to
> > > be also specified relative to initials sysroot during configure time
> > > 
> > > e.g. --with-sysroot=SYSROOT --with-gxx-include-dir=SYSROOT/usr/include/c++
> > > 
> > > since the original behavior of --with-gxx-include-dir is to specify an
> > > absolute path that is preserved whereas the patch we have in OE relocates
> > > gxx-include-dir regardless.Therefore in order to adopt this patch we have
> > > to use the above syntax which was original syntax before the above patch
> > > and would make up forward compatible provided this patch makes into gcc
> > > upstream.
> > > 
> > > > 
> > > > > 
> > > > > > I appreciate that patch adds in the prefix to the --with-gxx-include-dir
> > > > > > option but it then removes it again during configure so this should be a
> > > > > > null op. Both versions of the patch set the "1" bit in gcc/cppdefault.c.
> > > > > >
> > > > > > So where is the change this patch makes which fixes things?
> > > > > 
> > > > > changing --with-gxx-include-dir to be within sysroot triggers the
> > > > > relocation code.
> > > > 
> > > > But we were already triggering the relocation code?
> > > > 
> > > > I can't see *any* functionality difference between these, they should
> > > > both just give the same result as far as I can tell...
> > > > 
> > > same functionality but with a different usage see above
> > > 
> > > > Claiming it fixes things is therefore concerning me.
> > > 
> > > correct it does not fix anything actually that I know was broken before
> > > Thinking out loud given that with-gxx-include-dir is absolute in nature it could be
> > > the original patch we have, does not work in some weird case since the
> > > absolute path we use is still /usr/include/c++ during configure time.
> > > although I would expect that the include poisoning warning will report it if that
> > > happened
> > > 
> > > -Khem
> > 
> > Is there some pending patch for meta-oe/gcc?
> > 
> > I have some issues while rebuilding toolchain from scratch after this
> > patchset:
> > 
> > armv7a:
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/rtl.h:2163:12: note: expected 'enum machine_mode' but argument is of type 'int'
> > | gcc -c   -isystem/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../include -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libcpp/include  -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber/dpd -I../libdecnumber    /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/calls.c -o calls.o
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/calls.c: In function 'initialize_argument_information':
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/calls.c:1089:9: error: 'STACK_CHECK_MAX_VAR_SIZE' undeclared (first use in this function)
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/calls.c:1089:9: note: each undeclared identifier is reported only once for each function it appears in
> > | make[2]: *** [calls.o] Error 1
> > 
> > armv4t:
> > | gcc -c   -isystem/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../include -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libcpp/include  -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber/dpd -I../libdecnumber    insn-output.c -o insn-output.o
> > | In file included from insn-emit.c:23:0:
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/constraints.md: In function 'satisfies_constraint_Uu':
> > | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/constraints.md:353:6: warning: implicit declaration of function 'thumb1_legitimate_address_p' [-Wimplicit-function-declaration]
> > | insn-opinit.c: In function 'init_all_optabs':
> > | insn-opinit.c:25:5: warning: implicit declaration of function 'set_widening_optab_handler' [-Wimplicit-function-declaration]
> > | insn-opinit.c:30:7: error: 'TARGET_IDIV' undeclared (first use in this function)
> > | insn-opinit.c:30:7: note: each undeclared identifier is reported only once for each function it appears in
> > | insn-opinit.c:813:32: error: 'vec_load_lanes_optab' undeclared (first use in this function)
> > | insn-opinit.c:833:32: error: 'vec_store_lanes_optab' undeclared (first use in this function)
> > | insn-opinit.c:1009:24: error: 'vec_widen_sshiftl_lo_optab' undeclared (first use in this function)
> > | insn-opinit.c:1011:24: error: 'vec_widen_ushiftl_lo_optab' undeclared (first use in this function)
> > | insn-opinit.c:1021:24: error: 'vec_widen_sshiftl_hi_optab' undeclared (first use in this function)
> > | insn-opinit.c:1023:24: error: 'vec_widen_ushiftl_hi_optab' undeclared (first use in this function)
> > | make[2]: *** [insn-opinit.o] Error 1
> > | make[2]: *** Waiting for unfinished jobs....
> 
> and different one for armv5te too:
> | GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/. -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../include -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libcpp/include  -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber -I/OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/../libdecnumber/dpd -I../libdecnumber    /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/cgraphbuild.c -o cgraphbuild.o
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c: In function 'bounds_check':
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:9204:5: warning: format not a string literal and no format arguments [-Wformat-security]
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c: In function 'arm_print_operand':
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:16786:4: warning: format not a string literal and no format arguments [-Wformat-security]
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c: In function 'arm_init_neon_builtins':
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:19270:4: error: 'neon_struct_operand' undeclared (first use in this function)
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:19270:4: note: each undeclared identifier is reported only once for each function it appears in
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c: At top level:
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:6753:1: warning: 'arm_legitimate_constant_p' defined but not used [-Wunused-function]
> | /OE/shr-core/tmp-eglibc/work-shared/gcc-4.6.2+svnr181430-r23/gcc-4_6-branch/gcc/config/arm/arm.c:22697:1: warning: 'arm_array_mode_supported_p' defined but not used [-Wunused-function]
> | make[2]: *** [arm.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | rm gcov.pod cpp.pod gfdl.pod gcc.pod fsf-funding.pod
> | make[2]: Leaving directory `/OE/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/gcc'
> | make[1]: *** [all-gcc] Error 2
> | make[1]: Leaving directory `/OE/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi'
> | make: *** [all] Error 2

without
PARALLEL_MAKE="-j4"
BB_NUMBER_THREADS = "2"
I've managed to build toolchain for one arch, but after switching MACHINE it fails again:

| Checking multilib configuration for libgcc...
| Configuring in arm-oe-linux-gnueabi/libgcc
| configure: loading cache ./config.cache
| configure: error: `CC' has changed since the previous run:
| configure:   former value:  ` /OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/./gcc/xgcc -B/OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/./gcc/ -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -isystem/OE/shr-core/tmp/sysroots/nokia900/usr/include -B/OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/bin/ -B/OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/lib/ -isystem /OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/include -isystem /OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/sys-include --sysroot=/OE/shr-core/tmp/sysroots/nokia900  '
| configure:   current value: ` /OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/./gcc/xgcc -B/OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/./gcc/ -march=armv7-a -fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -isystem/OE/shr-core/tmp/sysroots/palmpre/usr/include -B/OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oeERROR: Function 'do_compile' failed (see /OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/temp/log.do_compile.13936 for further information)
| -linux-gnueabi/bin/ -B/OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/lib/ -isystem /OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/include -isystem /OE/shr-core/tmp/sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/sys-include --sysroot=/OE/shr-core/tmp/sysroots/palmpre  '
| configure: error: in `/OE/shr-core/tmp/work/armv7a-vfp-neon-oe-linux-gnueabi/gcc-cross/4.6.2+svnr181430-r23/gcc-4_6-branch/build.x86_64-linux.arm-oe-linux-gnueabi/arm-oe-linux-gnueabi/libgcc':
| configure: error: changes in the environment can compromise the build
| configure: error: run `make distclean' and/or `rm ./config.cache' and start over
| make: *** [configure-target-libgcc] Error 1
| + die 'oe_runmake failed'
| + bbfatal 'oe_runmake failed'
| + echo 'ERROR: oe_runmake failed'
| ERROR: oe_runmake failed
| + exit 1
NOTE: package gcc-cross-4.6.2+svnr181430-r23: task do_compile: Failed
ERROR: Task 131 (/OE/shr-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_4.6.bb, do_compile) failed with exit code '1'

maybe it's because something was reused from work-shared?

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2011-12-20 16:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14  8:28 [PATCH] gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option Khem Raj
2011-12-14 10:02 ` Richard Purdie
2011-12-14 15:49   ` Khem Raj
2011-12-15 12:16     ` Richard Purdie
2011-12-16 21:24       ` Khem Raj
2011-12-20  9:07         ` Martin Jansa
2011-12-20  9:37           ` Martin Jansa
2011-12-20 16:15             ` Martin Jansa [this message]
2011-12-20 17:45               ` Khem Raj
2011-12-14 18:08   ` Ulf Samuelsson
2011-12-14 18:38     ` Khem Raj
2011-12-20  6:36       ` Eric Bénard
2011-12-20 19:59         ` Khem Raj
2011-12-21 14:23           ` Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111220161504.GA12791@jama.jama.net \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.