All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe LEROY <christophe.leroy@c-s.fr>,
	linuxppc-dev@ozlabs.org,
	Segher Boessenkool  <segher@kernel.crashing.org>
Subject: Re: [PATCH] powerpc: Fix stackprotector detection for non-glibc toolchains
Date: Sat, 13 Oct 2018 22:55:01 +1100	[thread overview]
Message-ID: <87k1mm12p6.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <7e1acec1-c840-321b-0a93-99679fce6cb3@c-s.fr>

Christophe LEROY <christophe.leroy@c-s.fr> writes:
> Le 13/10/2018 à 00:58, Michael Ellerman a écrit :
>> If GCC is not built with glibc support then we must explicitly tell it
>> which register to use for TLS mode stack protector, otherwise it will
>> error out and the cc-option check will fail.
>
> Oh ? I didn't encounter such a problem with the nolibc GCC from 
> https://mirrors.edge.kernel.org/pub/tools/crosstool/

Yes, you're right.

  $ /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc -o empty.o -Wall -c empty.c -mstack-protector-guard=tls 
  $ echo $?
  0

But with mine:
  $ /home/kerkins/toolchains/ppc/gcc-8-branch/powerpc-linux/bin/powerpc-linux-gcc -o empty.o -Wall -c empty.c -mstack-protector-guard=tls 
  cc1: error: ‘-mstack-protector-guard=tls’ needs a valid base register


So it's only my cross compilers that don't work.

The kernel.org ones are:
  Configured with: /home/arnd/git/gcc/configure --target=powerpc64-linux
  --enable-targets=all
  --prefix=/home/arnd/cross/x86_64/gcc-8.1.0-nolibc/powerpc64-linux
  --enable-languages=c --without-headers --disable-bootstrap
  --disable-nls --disable-threads --disable-shared --disable-libmudflap
  --disable-libssp --disable-libgomp --disable-decimal-float
  --disable-libquadmath --disable-libatomic --disable-libcc1
  --disable-libmpx --enable-checking=release

Whereas mine is:
  Configured with: ../../src/gcc/configure
  --prefix=/home/kerkins/workspace/gcc-build/gcc/gcc-8-branch/target/ppc/build/install/powerpc-linux
  --disable-multilib --disable-bootstrap --enable-languages=c
  --with-pkgversion='Custom 2c79ff811dfcee1c' --target=powerpc-linux
  --enable-targets=all


So I wonder if something in there is making the difference?

I guess I'll just rewrite the change log to say "some toolchains".

cheers

  reply	other threads:[~2018-10-13 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 22:58 [PATCH] powerpc: Fix stackprotector detection for non-glibc toolchains Michael Ellerman
2018-10-13  7:32 ` Christophe LEROY
2018-10-13 11:55   ` Michael Ellerman [this message]
2018-10-13 15:48     ` Segher Boessenkool
2018-10-15  9:36       ` Michael Ellerman
2018-10-15  4:01 ` Michael Ellerman

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=87k1mm12p6.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=christophe.leroy@c-s.fr \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=segher@kernel.crashing.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.