Message ID | CAM=EW8by9g=0xyB=71PcZpYYv1JJeyhuurjTH8AT6Cu6JPrUig@mail.gmail.com |
---|---|
State | Superseded |
Headers | show |
David, All, On Thursday 04 October 2012 08:18:21 David Holsgrove wrote: > # HG changeset patch > # User David Holsgrove <david.holsgrove@xilinx.com> > # Date 1348552500 -36000 > # Node ID 2df8f5a184b721e66a24db1aef61529691195393 > # Parent 43ace4bb005eef085437e3d4fbaef528ef0ef005 > scripts/gcc.sh: Add copyheaders section for baremetal canadian [--SNIP--] > @@ -221,8 +221,13 @@ > fi > > if [ "${copy_headers}" = "y" ]; then > - CT_DoLog DEBUG "Copying headers to install area of bootstrap > gcc, so it can build libgcc2" > - CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" > "${prefix}/${CT_TARGET}/include" > + if [ "${mode}" = "baremetal" ]; then > + CT_DoLog DEBUG "Copying headers from newlib source to > install area of bootstrap gcc, so it can build libstdc++" > + CT_DoExecLog ALL cp -a > "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." > "${prefix}/${CT_TARGET}/include" > + else > + CT_DoLog DEBUG "Copying headers to install area of > bootstrap gcc, so it can build libgcc2" > + CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" > "${prefix}/${CT_TARGET}/include" > + fi > fi > > for tmp in ARCH ABI CPU TUNE FPU FLOAT; do Your mailer mangles the patches you send. I've been bitten by this when trying to apply your canadian-multilib patch, and I missed half of it. Regards, Yann E. MORIN.
Yann, All, On 14 October 2012 02:21, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > David, All, > > On Thursday 04 October 2012 08:18:21 David Holsgrove wrote: >> # HG changeset patch >> # User David Holsgrove <david.holsgrove@xilinx.com> >> # Date 1348552500 -36000 >> # Node ID 2df8f5a184b721e66a24db1aef61529691195393 >> # Parent 43ace4bb005eef085437e3d4fbaef528ef0ef005 >> scripts/gcc.sh: Add copyheaders section for baremetal canadian > [--SNIP--] >> @@ -221,8 +221,13 @@ >> fi >> >> if [ "${copy_headers}" = "y" ]; then >> - CT_DoLog DEBUG "Copying headers to install area of bootstrap >> gcc, so it can build libgcc2" >> - CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" >> "${prefix}/${CT_TARGET}/include" >> + if [ "${mode}" = "baremetal" ]; then >> + CT_DoLog DEBUG "Copying headers from newlib source to >> install area of bootstrap gcc, so it can build libstdc++" >> + CT_DoExecLog ALL cp -a >> "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." >> "${prefix}/${CT_TARGET}/include" >> + else >> + CT_DoLog DEBUG "Copying headers to install area of >> bootstrap gcc, so it can build libgcc2" >> + CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" >> "${prefix}/${CT_TARGET}/include" >> + fi >> fi >> >> for tmp in ARCH ABI CPU TUNE FPU FLOAT; do > > Your mailer mangles the patches you send. I've been bitten by this when > trying to apply your canadian-multilib patch, and I missed half of it. > Apologies Yann, I've attached the patch to this mail, hadnt realised it was mangled. 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
David, All, On Monday 15 October 2012 David Holsgrove wrote: > On 14 October 2012 02:21, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > On Thursday 04 October 2012 08:18:21 David Holsgrove wrote: > >> # HG changeset patch > >> # User David Holsgrove <david.holsgrove@xilinx.com> > >> # Date 1348552500 -36000 > >> # Node ID 2df8f5a184b721e66a24db1aef61529691195393 > >> # Parent 43ace4bb005eef085437e3d4fbaef528ef0ef005 > >> scripts/gcc.sh: Add copyheaders section for baremetal canadian > > [--SNIP--] > > Your mailer mangles the patches you send. I've been bitten by this when > > trying to apply your canadian-multilib patch, and I missed half of it. > > Apologies Yann, I've attached the patch to this mail, hadnt realised > it was mangled. No problem, I've already fixed it here. However, I'm not too fond of a component (here, gcc) having to deal with the internals of another compoent (here, newlib), so I'm pondering another change to fix this: - have newlib install its headers in libc_start_files, as the other C libraries do; - always copy the headers; - get rid of ${copy_headers} altogether. What do you think about this? Regards, Yann E. MORIN.
Hi Yann, [--SNIP--] >> Apologies Yann, I've attached the patch to this mail, hadnt realised >> it was mangled. > > No problem, I've already fixed it here. > > However, I'm not too fond of a component (here, gcc) having to deal with > the internals of another compoent (here, newlib), so I'm pondering another > change to fix this: > - have newlib install its headers in libc_start_files, as the other C > libraries do; > - always copy the headers; > - get rid of ${copy_headers} altogether. > > What do you think about this? Sounds good to me - adding a copy of the newlib headers inside gcc.sh was a quick way to test this but I agree it should match the behaviour of other libc components. I've attached two patches, one for newlib which adds a copy of the headers in its libc_start_files stage, and a second patch for gcc which removes the ${copyheaders} toggle and instead always does the copy in do_cc_core_backend. thanks again, 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
diff -r 43ace4bb005e -r 2df8f5a184b7 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 Tue Sep 25 15:55:00 2012 +1000 @@ -207,7 +207,7 @@ extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - copy_headers=n + copy_headers=y ;; *) CT_Abort "Internal Error: 'mode' must be one of: