* [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib @ 2012-09-19 3:43 David Holsgrove 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: David Holsgrove @ 2012-09-19 3:43 UTC (permalink / raw) To: Yann E. Morin; +Cc: crossgcc # HG changeset patch # User David Holsgrove <david.holsgrove@xilinx.com> # Date 1348016639 -36000 # Node ID 95abeed3a485c4d5b02e4860fc554d6841e1cc41 # Parent 2858a24a584642e263a920b4214c815c172ed547 scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib will fail As this is only for pretty log output, can safely sidestep diff -r 2858a24a5846 -r 95abeed3a485 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Sun Aug 12 07:45:42 2012 -0400 +++ b/scripts/build/cc/gcc.sh Wed Sep 19 11:03:59 2012 +1000 @@ -460,7 +460,8 @@ [ -z "${file}" ] || ext=".${file##*.}" CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" - if [ "${CT_MULTILIB}" = "y" ]; then + # Skip for Canadian Build, can't run on the system and only gives pretty log output. + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ |tail -n +2 ) ) if [ ${#multilibs[@]} -ne 0 ]; then @@ -815,7 +816,8 @@ [ -z "${file}" ] || ext=".${file##*.}" CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" - if [ "${CT_MULTILIB}" = "y" ]; then + # Skip for Canadian Build, can't run on the system and only gives pretty log output. + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" -print-multi-lib \ |tail -n +2 ) ) if [ ${#multilibs[@]} -ne 0 ]; then -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library 2012-09-19 3:43 [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib David Holsgrove @ 2012-09-19 3:43 ` David Holsgrove 2012-09-19 4:42 ` Mike Frysinger 2012-09-19 21:38 ` Yann E. MORIN 2012-09-19 4:37 ` [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib Mike Frysinger 2012-09-19 20:57 ` Yann E. MORIN 2 siblings, 2 replies; 12+ messages in thread From: David Holsgrove @ 2012-09-19 3:43 UTC (permalink / raw) To: Yann E. Morin; +Cc: crossgcc # HG changeset patch # User David Holsgrove <david.holsgrove@xilinx.com> # Date 1348016531 -36000 # Node ID 24e33e3717f8a740f7c65a0d05a1bed51535c690 # Parent 95abeed3a485c4d5b02e4860fc554d6841e1cc41 config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library Add option to enable building a multilib aware gcc, without building out all the multilib combos for the c library diff -r 95abeed3a485 -r 24e33e3717f8 config/target.in --- a/config/target.in Wed Sep 19 11:03:59 2012 +1000 +++ b/config/target.in Wed Sep 19 11:02:11 2012 +1000 @@ -60,6 +60,20 @@ in gcc, so it is not possible to say what variants to support, only whether hard-coded variants should be supported or not. +if MULTILIB + +config MULTILIB_GCC_ONLY + bool + prompt "Disable building multilib combos of c-library" + depends on EXPERIMENTAL + depends on MULTILIB + default n + help + If you say 'y' here, then gcc will be built with multi-lib support, + but the eglibc/glibc multilib combos won't + +endif # MULTILIB + #-------------------------------------- config ARCH_SUPPORTS_BOTH_MMU bool diff -r 95abeed3a485 -r 24e33e3717f8 scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Wed Sep 19 11:03:59 2012 +1000 +++ b/scripts/build/libc/glibc-eglibc.sh-common Wed Sep 19 11:02:11 2012 +1000 @@ -103,7 +103,13 @@ # If gcc is not configured for multilib, it still prints # a single line for the default settings - multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) ) + if [ "${CT_MULTILIB_GCC_ONLY}" = "y" ]; then + CT_DoLog EXTRA "Building of multilib C library Disabled" + multilibs=".;" + else + multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) ) + fi + for multilib in "${multilibs[@]}"; do multi_dir="${multilib%%;*}" if [ "${multi_dir}" != "." ]; then -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove @ 2012-09-19 4:42 ` Mike Frysinger 2012-09-19 21:38 ` Yann E. MORIN 1 sibling, 0 replies; 12+ messages in thread From: Mike Frysinger @ 2012-09-19 4:42 UTC (permalink / raw) To: crossgcc; +Cc: David Holsgrove, Yann E. Morin [-- Attachment #1: Type: Text/Plain, Size: 806 bytes --] On Tuesday 18 September 2012 23:42:49 David Holsgrove wrote: > Add option to enable building a multilib aware gcc, without building out > all the multilib combos for the c library erm, gcc needs a multilib glibc in order to build its own multilibs (libgcc_s, libstdc++, etc...). all of its shared libs get linked against glibc's shared libs, and i think it uses glibc's start objects too. i'm not really sure what it is you're trying to do (since the stated description makes no sense), but if all you want is a gcc which can do code generation for all of its native targets, then it sounds like you want to pass --enable-targets=all. for ppc/sparc/x86, this allows the compiler to simultaneously support things like -m32/-m64 (minus the libraries/start objects of course). -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove 2012-09-19 4:42 ` Mike Frysinger @ 2012-09-19 21:38 ` Yann E. MORIN 2012-09-21 4:41 ` David Holsgrove 1 sibling, 1 reply; 12+ messages in thread From: Yann E. MORIN @ 2012-09-19 21:38 UTC (permalink / raw) To: crossgcc; +Cc: David Holsgrove David, All, On Wednesday 19 September 2012 05:42:49 David Holsgrove wrote: > # HG changeset patch > # User David Holsgrove <david.holsgrove@xilinx.com> > # Date 1348016531 -36000 > # Node ID 24e33e3717f8a740f7c65a0d05a1bed51535c690 > # Parent 95abeed3a485c4d5b02e4860fc554d6841e1cc41 > config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library > > Add option to enable building a multilib aware gcc, without building out all the multilib combos > for the c library As Mike stated, gcc needs the full set of C library combos to do the actual link. So, it's not obvious why you are trying to disable those combos. Care to elaborate a bit on the use-case? > diff -r 95abeed3a485 -r 24e33e3717f8 config/target.in > --- a/config/target.in Wed Sep 19 11:03:59 2012 +1000 > +++ b/config/target.in Wed Sep 19 11:02:11 2012 +1000 > @@ -60,6 +60,20 @@ > in gcc, so it is not possible to say what variants to support, only > whether hard-coded variants should be supported or not. > > +if MULTILIB > + > +config MULTILIB_GCC_ONLY > + bool > + prompt "Disable building multilib combos of c-library" > + depends on EXPERIMENTAL > + depends on MULTILIB This 'depends on MULTILIB' is redundant with the 'if MULTILIB', above. Drop the 'if MULTILIB'. > + default n > + help > + If you say 'y' here, then gcc will be built with multi-lib support, > + but the eglibc/glibc multilib combos won't > + > +endif # MULTILIB > + > #-------------------------------------- > config ARCH_SUPPORTS_BOTH_MMU > bool > diff -r 95abeed3a485 -r 24e33e3717f8 scripts/build/libc/glibc-eglibc.sh-common > --- a/scripts/build/libc/glibc-eglibc.sh-common Wed Sep 19 11:03:59 2012 +1000 > +++ b/scripts/build/libc/glibc-eglibc.sh-common Wed Sep 19 11:02:11 2012 +1000 > @@ -103,7 +103,13 @@ > > # If gcc is not configured for multilib, it still prints > # a single line for the default settings > - multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) ) > + if [ "${CT_MULTILIB_GCC_ONLY}" = "y" ]; then > + CT_DoLog EXTRA "Building of multilib C library Disabled" > + multilibs=".;" $multilibs is expected to be an array, not a string, so this should be: multilibs=( ".;" ) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library 2012-09-19 21:38 ` Yann E. MORIN @ 2012-09-21 4:41 ` David Holsgrove 0 siblings, 0 replies; 12+ messages in thread From: David Holsgrove @ 2012-09-21 4:41 UTC (permalink / raw) To: Yann E. MORIN; +Cc: crossgcc Hi Yann / Mike, All, On 20 September 2012 07:38, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > David, All, > > On Wednesday 19 September 2012 05:42:49 David Holsgrove wrote: >> # HG changeset patch >> # User David Holsgrove <david.holsgrove@xilinx.com> >> # Date 1348016531 -36000 >> # Node ID 24e33e3717f8a740f7c65a0d05a1bed51535c690 >> # Parent 95abeed3a485c4d5b02e4860fc554d6841e1cc41 >> config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library >> >> Add option to enable building a multilib aware gcc, without building out all the multilib combos >> for the c library > > As Mike stated, gcc needs the full set of C library combos to do the > actual link. So, it's not obvious why you are trying to disable those > combos. > > Care to elaborate a bit on the use-case? Thanks for the comments, My reason for adding this locally was to replicate the toolchains we produced in the era before crosstool-NG had multi-lib building capability (and we had more external steps), by essentially just passing --enable-multilib to the gcc configure stage. I used it more for rapidly building a pseudo-multilibed toolchain (which has multilib versions of libgcc/libstdc++ etc, even if they were linked against a non multilibed c library) for platform integration tests (eg correct response to -print-multi-lib) as opposed to validity. It also allowed me to side step an issue I've noticed with the C library multilib loop where it created symlinks to bridge the difference in where gcc / glibcs expects to install - if we have nested multi_dirs (eg bs/m/mh), the symlinks are broken. I've got a patch to propose which works for me which I'll send on now for review. In relation to this patch - please disregard - on second thoughts it wont be useful to upstream :-) thanks again, David [--SNIP--] > > Regards, > Yann E. MORIN. > > -- > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | > | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | > '------------------------------^-------^------------------^--------------------' > > -- > For unsubscribe information see http://sourceware.org/lists.html#faq > -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-19 3:43 [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib David Holsgrove 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove @ 2012-09-19 4:37 ` Mike Frysinger 2012-09-19 13:46 ` Ralf Corsepius 2012-09-19 20:59 ` Yann E. MORIN 2012-09-19 20:57 ` Yann E. MORIN 2 siblings, 2 replies; 12+ messages in thread From: Mike Frysinger @ 2012-09-19 4:37 UTC (permalink / raw) To: crossgcc; +Cc: David Holsgrove, Yann E. Morin [-- Attachment #1: Type: Text/Plain, Size: 289 bytes --] On Tuesday 18 September 2012 23:42:48 David Holsgrove wrote: > With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib will > fail if you have access to the compiled code still, you should be able to execute the local xgcc for the relevant information i think -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-19 4:37 ` [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib Mike Frysinger @ 2012-09-19 13:46 ` Ralf Corsepius 2012-09-19 20:59 ` Yann E. MORIN 1 sibling, 0 replies; 12+ messages in thread From: Ralf Corsepius @ 2012-09-19 13:46 UTC (permalink / raw) To: crossgcc On 09/19/2012 06:37 AM, Mike Frysinger wrote: > On Tuesday 18 September 2012 23:42:48 David Holsgrove wrote: >> With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib will >> fail > > if you have access to the compiled code still, you should be able to execute > the local xgcc for the relevant information i think Errm, this would be news to me ;) AFAICT, to be able to build Canadian Crosses, you normally need to have a copy of a $build->$target cross-compiler pre-installed, which GCC then will use when building the $host->$target compiler. It's at least how I build toolchains canadian-cross (I am not using crossgcc) Ralf -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-19 4:37 ` [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib Mike Frysinger 2012-09-19 13:46 ` Ralf Corsepius @ 2012-09-19 20:59 ` Yann E. MORIN 1 sibling, 0 replies; 12+ messages in thread From: Yann E. MORIN @ 2012-09-19 20:59 UTC (permalink / raw) To: crossgcc; +Cc: Mike Frysinger, David Holsgrove Mike, David, All, On Wednesday 19 September 2012 06:37:06 Mike Frysinger wrote: > On Tuesday 18 September 2012 23:42:48 David Holsgrove wrote: > > With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib will > > fail > > if you have access to the compiled code still, you should be able to execute > the local xgcc for the relevant information i think Right, but I'm not too fond of digging in the internals of gcc. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-19 3:43 [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib David Holsgrove 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove 2012-09-19 4:37 ` [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib Mike Frysinger @ 2012-09-19 20:57 ` Yann E. MORIN 2012-09-20 1:48 ` David Holsgrove 2 siblings, 1 reply; 12+ messages in thread From: Yann E. MORIN @ 2012-09-19 20:57 UTC (permalink / raw) To: David Holsgrove; +Cc: crossgcc David, All, On Wednesday 19 September 2012 05:42:48 David Holsgrove wrote: > # HG changeset patch > # User David Holsgrove <david.holsgrove@xilinx.com> > # Date 1348016639 -36000 > # Node ID 95abeed3a485c4d5b02e4860fc554d6841e1cc41 > # Parent 2858a24a584642e263a920b4214c815c172ed547 > scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib > > With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib will fail That's right. But the fix you suggest is wrong, see below. > As this is only for pretty log output, can safely sidestep > > diff -r 2858a24a5846 -r 95abeed3a485 scripts/build/cc/gcc.sh > --- a/scripts/build/cc/gcc.sh Sun Aug 12 07:45:42 2012 -0400 > +++ b/scripts/build/cc/gcc.sh Wed Sep 19 11:03:59 2012 +1000 > @@ -460,7 +460,8 @@ > [ -z "${file}" ] || ext=".${file##*.}" > CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" > > - if [ "${CT_MULTILIB}" = "y" ]; then > + # Skip for Canadian Build, can't run on the system and only gives pretty log output. > + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then This is the part that deals with the core pass-1 and pass-2 compilers, so they are expected to run on the build machine, so we should be able to run them (hell, they're gonna be used later to build the C library!) Unfortunately, that part also deals with the final compiler for bare metal, which we indeed can not run when it's canadian. > multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ Simply doing the following: multilibs=( $( "${CT_TARGET}-gcc" -print-multi-lib \ is not enough here, as that would call: 1- in cross-mode, and not bare-metal: only the core compiler 2- in cross-mode, and bare-metal: the final compiler 3- in canadian-mode, and not bare-metal: always the core compiler 4- in canadian-mode, and bare-metal: always the core compiler This is not possible, because: 1- is OK 2- is OK 3- is OK 4- is wrong: we want to know the final compiler multilib support, not the core compiler multilib support > |tail -n +2 ) ) > if [ ${#multilibs[@]} -ne 0 ]; then > @@ -815,7 +816,8 @@ > [ -z "${file}" ] || ext=".${file##*.}" > CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" > > - if [ "${CT_MULTILIB}" = "y" ]; then > + # Skip for Canadian Build, can't run on the system and only gives pretty log output. > + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then Here, that's right. This is the part that deals with the final gcc for non bare-metal. So we can only run it if its not canadian. > multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" -print-multi-lib \ ^^^^^^^^^^^^^^^^ There's a latent bug here --/ That should be ${prefix} I'll fix here. So, do we still need to print the multilib status, after all? Could we just remove that? Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-19 20:57 ` Yann E. MORIN @ 2012-09-20 1:48 ` David Holsgrove 2012-10-04 6:20 ` David Holsgrove 0 siblings, 1 reply; 12+ messages in thread From: David Holsgrove @ 2012-09-20 1:48 UTC (permalink / raw) To: Yann E. MORIN; +Cc: crossgcc Hi Yann, Mike, Ralf, All On 20 September 2012 06:57, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > David, All, > > On Wednesday 19 September 2012 05:42:48 David Holsgrove wrote: > > # HG changeset patch > > # User David Holsgrove <david.holsgrove@xilinx.com> > > # Date 1348016639 -36000 > > # Node ID 95abeed3a485c4d5b02e4860fc554d6841e1cc41 > > # Parent 2858a24a584642e263a920b4214c815c172ed547 > > scripts/build/gcc.sh: When compiling a Canadian Cross avoid using > > -print-multi-lib > > > > With a candian cross, attempting to ${CT_TARGET}-gcc -print-multi-lib > > will fail > > That's right. But the fix you suggest is wrong, see below. > > > As this is only for pretty log output, can safely sidestep > > > > diff -r 2858a24a5846 -r 95abeed3a485 scripts/build/cc/gcc.sh > > --- a/scripts/build/cc/gcc.sh Sun Aug 12 07:45:42 2012 -0400 > > +++ b/scripts/build/cc/gcc.sh Wed Sep 19 11:03:59 2012 +1000 > > @@ -460,7 +460,8 @@ > > [ -z "${file}" ] || ext=".${file##*.}" > > CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" > > "${prefix}/bin/${CT_TARGET}-cc${ext}" > > > > - if [ "${CT_MULTILIB}" = "y" ]; then > > + # Skip for Canadian Build, can't run on the system and only gives > > pretty log output. > > + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then > > This is the part that deals with the core pass-1 and pass-2 compilers, > so they are expected to run on the build machine, so we should be able > to run them (hell, they're gonna be used later to build the C library!) > > Unfortunately, that part also deals with the final compiler for bare > metal, > which we indeed can not run when it's canadian. > Yes, this is the reason for my change to the do_cc_core_backend as well as the do_cc_backend version of this print-multi-lib log output, my use cases are for canadian cross baremetal / canadian cross linux toolchains. Perhaps a less obtrusive change for this would be; if [ "${CT_MULTILIB}" = "y" ]; then if [ "${CT_CANADIAN}" = "y" -a "${CT_BARE_METAL}" = "y" ]; then CT_DoLog WARN "Canadian Cross Baremetal unable to confirm multilibs configured correctly" else multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ |tail -n +2 ) ) [SNIP] fi fi > > multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" > > -print-multi-lib \ > > Simply doing the following: > multilibs=( $( "${CT_TARGET}-gcc" -print-multi-lib \ > > is not enough here, as that would call: > 1- in cross-mode, and not bare-metal: only the core compiler > 2- in cross-mode, and bare-metal: the final compiler > 3- in canadian-mode, and not bare-metal: always the core compiler > 4- in canadian-mode, and bare-metal: always the core compiler > > This is not possible, because: > 1- is OK > 2- is OK > 3- is OK > 4- is wrong: we want to know the final compiler multilib support, not > the core compiler multilib support > > > |tail -n +2 ) ) > > if [ ${#multilibs[@]} -ne 0 ]; then > > @@ -815,7 +816,8 @@ > > [ -z "${file}" ] || ext=".${file##*.}" > > CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" > > "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" > > > > - if [ "${CT_MULTILIB}" = "y" ]; then > > + # Skip for Canadian Build, can't run on the system and only gives > > pretty log output. > > + if [ "${CT_MULTILIB}" = "y" -a "${CT_CANADIAN}" != "y" ]; then > > Here, that's right. This is the part that deals with the final gcc for non > bare-metal. So we can only run it if its not canadian. > > > multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" > > -print-multi-lib \ > ^^^^^^^^^^^^^^^^ > There's a latent bug here --/ That should be ${prefix} > > I'll fix here. > > So, do we still need to print the multilib status, after all? > Could we just remove that? > It's a nice check, but in the conditions mentioned its impossible, and is only a CT_DoLog EXTRA / CT_DoLog WARN in any case. thanks, David > Regards, > Yann E. MORIN. > > -- > > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' > conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ > | > | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is > no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v > conspiracy. | > > '------------------------------^-------^------------------^--------------------' > > -- > For unsubscribe information see http://sourceware.org/lists.html#faq > -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib 2012-09-20 1:48 ` David Holsgrove @ 2012-10-04 6:20 ` David Holsgrove 2012-10-12 21:51 ` scripts/gcc: Canadian Cross skip -print-multi-lib log output Yann E. MORIN 0 siblings, 1 reply; 12+ messages in thread From: David Holsgrove @ 2012-10-04 6:20 UTC (permalink / raw) To: Yann E. MORIN; +Cc: crossgcc Hi Yann, All On 20 September 2012 11:47, David Holsgrove <david.holsgrove@xilinx.com> wrote: > Hi Yann, Mike, Ralf, All > > On 20 September 2012 06:57, Yann E. MORIN <yann.morin.1998@free.fr> wrote: >> >> David, All, [SNIP] >> >> Unfortunately, that part also deals with the final compiler for bare >> metal, >> which we indeed can not run when it's canadian. >> > > Yes, this is the reason for my change to the do_cc_core_backend as > well as the do_cc_backend version of this print-multi-lib log output, > my use cases are for canadian cross baremetal / canadian cross linux toolchains. > [SNIP] >> Here, that's right. This is the part that deals with the final gcc for non >> bare-metal. So we can only run it if its not canadian. >> >> > multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" >> > -print-multi-lib \ >> ^^^^^^^^^^^^^^^^ >> There's a latent bug here --/ That should be ${prefix} >> >> I'll fix here. >> I've updated the patch to only skip the print-multi-lib log output for baremetal canadian cross on the final compiler stage, and both final compiler passes for linux canadian crosses. I also updated the CT_PREFIX_DIR to be ${prefix}. >> So, do we still need to print the multilib status, after all? >> Could we just remove that? Or, would you prefer to remove the log out altogether? Updated patch is as follows. thanks, David # HG changeset patch # User David Holsgrove <david.holsgrove@xilinx.com> # Date 1349330371 -36000 # Node ID ce3b27420d90afb20a68a013669d5ef097c55477 # Parent 43ace4bb005eef085437e3d4fbaef528ef0ef005 scripts/gcc: Canadian Cross skip -print-multi-lib log output Attempting to ${CT_TARGET}-gcc -print-multi-lib will fail In do_cc_core_backend, for the final compiler in a canadian cross baremetal, warn that multi-libs cannot be determined In do_cc_backend, for either final compiler for a canadian cross, warn that multi-libs cannot be determined (Plus fixed CT_PREFIX_DIR in do_cc_backend to be ${prefix}) Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com> diff -r 43ace4bb005e -r ce3b27420d90 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Wed Sep 26 16:37:31 2012 +0200 +++ b/scripts/build/cc/gcc.sh Thu Oct 04 15:59:31 2012 +1000 @@ -461,17 +461,22 @@ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" if [ "${CT_MULTILIB}" = "y" ]; then - multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ - |tail -n +2 ) ) - if [ ${#multilibs[@]} -ne 0 ]; then - CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):" - for i in "${multilibs[@]}"; do - dir="${i%%;*}" - flags="${i#*;}" - CT_DoLog EXTRA " ${flags//@/ -} --> ${dir}/" - done + if [ "${CT_CANADIAN}" = "y" -a "${mode}" = "baremetal" \ + -a "${host}" = "${CT_HOST}" ]; then + CT_DoLog WARN "Canadian Cross unable to confirm multilibs configured correctly" else - CT_DoLog WARN "gcc configured for multilib, but none available" + multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ + |tail -n +2 ) ) + if [ ${#multilibs[@]} -ne 0 ]; then + CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):" + for i in "${multilibs[@]}"; do + dir="${i%%;*}" + flags="${i#*;}" + CT_DoLog EXTRA " ${flags//@/ -} --> ${dir}/" + done + else + CT_DoLog WARN "gcc configured for multilib, but none available" + fi fi fi } @@ -816,17 +821,21 @@ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" if [ "${CT_MULTILIB}" = "y" ]; then - multilibs=( $( "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc" -print-multi-lib \ - |tail -n +2 ) ) - if [ ${#multilibs[@]} -ne 0 ]; then - CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):" - for i in "${multilibs[@]}"; do - dir="${i%%;*}" - flags="${i#*;}" - CT_DoLog EXTRA " ${flags//@/ -} --> ${dir}/" - done + if [ "${CT_CANADIAN}" = "y" ]; then + CT_DoLog WARN "Canadian Cross unable to confirm multilibs configured correctly" else - CT_DoLog WARN "gcc configured for multilib, but none available" + multilibs=( $( "${prefix}/bin/${CT_TARGET}-gcc" -print-multi-lib \ + |tail -n +2 ) ) + if [ ${#multilibs[@]} -ne 0 ]; then + CT_DoLog EXTRA "gcc configured with these multilibs (besides the default):" + for i in "${multilibs[@]}"; do + dir="${i%%;*}" + flags="${i#*;}" + CT_DoLog EXTRA " ${flags//@/ -} --> ${dir}/" + done + else + CT_DoLog WARN "gcc configured for multilib, but none available" + fi fi fi } -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
* scripts/gcc: Canadian Cross skip -print-multi-lib log output 2012-10-04 6:20 ` David Holsgrove @ 2012-10-12 21:51 ` Yann E. MORIN 0 siblings, 0 replies; 12+ messages in thread From: Yann E. MORIN @ 2012-10-12 21:51 UTC (permalink / raw) To: David Holsgrove; +Cc: crossgcc David, All, Your patch: scripts/gcc: Canadian Cross skip -print-multi-lib log output has been applied as #a6981147ccc0. Thank you! Regards, Yann E. MORIN. -- For unsubscribe information see http://sourceware.org/lists.html#faq ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-10-12 21:51 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-09-19 3:43 [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib David Holsgrove 2012-09-19 3:43 ` [PATCH 2 of 2] config/target.in+scripts/glibc-eglibc.sh-common: Allow building multilib gcc without full c library David Holsgrove 2012-09-19 4:42 ` Mike Frysinger 2012-09-19 21:38 ` Yann E. MORIN 2012-09-21 4:41 ` David Holsgrove 2012-09-19 4:37 ` [PATCH 1 of 2] scripts/build/gcc.sh: When compiling a Canadian Cross avoid using -print-multi-lib Mike Frysinger 2012-09-19 13:46 ` Ralf Corsepius 2012-09-19 20:59 ` Yann E. MORIN 2012-09-19 20:57 ` Yann E. MORIN 2012-09-20 1:48 ` David Holsgrove 2012-10-04 6:20 ` David Holsgrove 2012-10-12 21:51 ` scripts/gcc: Canadian Cross skip -print-multi-lib log output Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).