This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] cc/gcc: fix gcc 4.8 build for C library without threads support


Niels, All,

On 2014-01-03 10:58 +0100, Niels Penneman spake thusly:
> # HG changeset patch
> # User Niels Penneman <niels@penneman.org>
> # Date 1388743068 -3600
> #      Fri Jan 03 10:57:48 2014 +0100
> # Node ID 309df93f4354c80e05c950ded710d111c50d7b26
> # Parent  8e2077dfc250877b2182f31cac97bd1292e01026
> cc/gcc: fix gcc 4.8 build for C library without threads support
> Signed-off-by: Niels Penneman <niels@penneman.org>

Usually, we add an empty line after the subject. This scheme is canon
for DVCS (Hg, git) to separate the 'subject' from the 'body' of the
commit log, and display them correctly. That's a minor nit, I've fixed
it here.

Also, for this patch, the change is not obvious, so would have needed a
bit of explanations in the commit log, eg.:

    cc/gcc: fix gcc 4.8 build for C library without threads support

    libatomic calls the pthread primitives, which are not present if
    the C library lacks threads support, and the build breaks.

    In this case, just disable the build of libatomic.

    Signed-off-by: you@there

I had to look at libatomic to understand why it would not build without
threads. Granted, that was kind of easy, but not obvious.

In a commit log that fixes a problem, you have to explain:
  - what breaks
  - why it breaks
  - how you fixed it

Anyway, I've applied it nonetheless.

Thank you! :-)

Regards,
Yann E. MORIN.

> diff -r 8e2077dfc250 -r 309df93f4354 scripts/build/cc/gcc.sh
> --- a/scripts/build/cc/gcc.sh	Fri Jan 03 00:13:15 2014 +0100
> +++ b/scripts/build/cc/gcc.sh	Fri Jan 03 10:57:48 2014 +0100
> @@ -643,6 +643,11 @@
>      if [ -n "${CT_CC_ENABLE_CXX_FLAGS}" ]; then
>          extra_config+=("--enable-cxx-flags=${CT_CC_ENABLE_CXX_FLAGS}")
>      fi
> +    if [ "${CT_CC_GCC_4_8_or_later}" = "y" ]; then
> +        if [ "${CT_THREADS}" = "none" ]; then
> +            extra_config+=(--disable-libatomic)
> +        fi
> +    fi
>      if [ "${CT_CC_GCC_LIBMUDFLAP}" = "y" ]; then
>          extra_config+=(--enable-libmudflap)
>      else
> 
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]