Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gcc: Add option to build final-gcc with sysroot option
       [not found] <1258969104-4217-1-git-send-email-carmelo.amoroso@st.com>
@ 2009-11-27 14:51 ` Peter Korsgaard
       [not found]   ` <4B0FEA2F.9080508@st.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2009-11-27 14:51 UTC (permalink / raw)
  To: buildroot

>>>>> "Carmelo" == Carmelo AMOROSO <carmelo.amoroso@st.com> writes:

Hi,

Thanks for the patch.

 Carmelo> Add gcc config option BR2_GCC_FINAL_NEEDS_SYSROOT to build cross gcc
 Carmelo> (final stage) with --with-sysroot option.
 Carmelo> This is required to allow libgcc to use the correct the correct unwind
 Carmelo> functions implementation with NPTL.

 Carmelo> Indeed, if sysroot is not used, the inhibit_libc macro is defined
 Carmelo> for the LIBGCC2_CFLAGS (see gcc/configure)

 Carmelo> inhibit_libc=false
 Carmelo> if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
 Carmelo>        test x$with_newlib = xyes ; } &&
 Carmelo>      { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
 Carmelo>        inhibit_libc=true
 Carmelo> fi

 Carmelo> If inhibit_libc is defined, the actual implementation of unwind functions
 Carmelo> are taken from unwind-dw2-fde-c instead of the correct unwind-dw2-fde-glibc.c
 Carmelo> as required for NPTL case.

<cut>

 Carmelo> +config BR2_GCC_FINAL_NEEDS_SYSROOT
 Carmelo> +	bool "Gcc (final stage) needs sysroot to be set"
 Carmelo> +	default n
 Carmelo> +	help
 Carmelo> +	  If enabled, gcc (final stage) will be configured with --with-sysroot
 Carmelo> +	  set to $(STAGING_DIR) where uClibc runtime system has been installed.
 Carmelo> +	  This is required for building a toolchain working with uClibc NPTL.
 Carmelo> +

I'm not convinced we need a user visible option for this - It's a very
lowlevel detail that I don't think most users will know what to answer
to - Any reason we cannot just automatically enable this if
BR2_PTHREADS_NATIVE is enabled?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] gcc: Add option to build final-gcc with sysroot option
       [not found]   ` <4B0FEA2F.9080508@st.com>
@ 2009-11-27 15:07     ` Peter Korsgaard
  2009-11-28 20:41     ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2009-11-27 15:07 UTC (permalink / raw)
  To: buildroot

>>>>> "Carmelo" == Carmelo AMOROSO <carmelo.amoroso@st.com> writes:

Hi,

 >> I'm not convinced we need a user visible option for this - It's a very
 >> lowlevel detail that I don't think most users will know what to answer
 >> to - Any reason we cannot just automatically enable this if
 >> BR2_PTHREADS_NATIVE is enabled?

 Carmelo> No at all, indeed it is the better choice. Feel free to
 Carmelo> rework/adapt it.

Ok, will do - Thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] gcc: Add option to build final-gcc with sysroot option
       [not found]   ` <4B0FEA2F.9080508@st.com>
  2009-11-27 15:07     ` Peter Korsgaard
@ 2009-11-28 20:41     ` Peter Korsgaard
       [not found]       ` <4B1374D2.9090701@st.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2009-11-28 20:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Carmelo" == Carmelo AMOROSO <carmelo.amoroso@st.com> writes:

Hi,

 >> I'm not convinced we need a user visible option for this - It's a very
 >> lowlevel detail that I don't think most users will know what to answer
 >> to - Any reason we cannot just automatically enable this if
 >> BR2_PTHREADS_NATIVE is enabled?
 >> 
 Carmelo> No at all, indeed it is the better choice. Feel free to
 Carmelo> rework/adapt it.

Hmm, looking closer at it you're having me confused. You changed
gcc-uclibc-3.x.mk (E.G. the build rules used when NOT using sysroot) to
add a --with-sysroot configure argument. I would imagine this belongs in
gcc-uclibc-4.x.mk (E.G. the build rules used when using sysroot), but
there we already pass --with-sysroot=$(STAGING_DIR) to the final gcc
build (the BR2_CONFIGURE_STAGING_SYSROOT variable).

So is this change really needed?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] gcc: Add option to build final-gcc with sysroot option
       [not found]       ` <4B1374D2.9090701@st.com>
@ 2009-11-30  8:08         ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2009-11-30  8:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Carmelo" == Carmelo AMOROSO <carmelo.amoroso@st.com> writes:

Hi,

 Carmelo> please read the message
 Carmelo> http://lists.uclibc.org/pipermail/uclibc/2009-November/043303.html
 Carmelo> I've already noted this, so for gcc 4.x.y it is not required,
 Carmelo> but it should be applied for gcc 3.x.y. What do you think ?

But isn't sysroot a gcc >= 4.1.x feature? Do old gcc's even understand
--with-sysroot ?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-30  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1258969104-4217-1-git-send-email-carmelo.amoroso@st.com>
2009-11-27 14:51 ` [Buildroot] [PATCH] gcc: Add option to build final-gcc with sysroot option Peter Korsgaard
     [not found]   ` <4B0FEA2F.9080508@st.com>
2009-11-27 15:07     ` Peter Korsgaard
2009-11-28 20:41     ` Peter Korsgaard
     [not found]       ` <4B1374D2.9090701@st.com>
2009-11-30  8:08         ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox