Bug#701461: marked as done (gcc cannot compile in amd64 using -fPIE and -pie)
Your message dated Wed, 8 May 2013 01:39:01 +0200
with message-id <20130507233901.GA12268@volta.aurel32.net>
and subject line Bug#701461: gcc cannot compile in amd64 using -fPIE and -pie
has caused the Debian Bug report #701461,
regarding gcc cannot compile in amd64 using -fPIE and -pie
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)
--
701461: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701461
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: gcc cannot compile in amd64 using -fPIE and -pie
- From: Rick Terrel <rickterrel@gmail.com>
- Date: Sat, 23 Feb 2013 13:55:47 +0100
- Message-id: <CAK1K-GgAg9JVCyV6NePJvcY56O=Avebww7zOfM4BruBVWV7NOQ@mail.gmail.com>
Package: gcc
Version: 4:4.7.2-1
Severity: important
gcc cannot compile programs in amd64 with the -fPIE and -pie security flags. It seems that crt1.o is not compiled with -fPIC. I tested this with the "transmission" package:
Flags used:
export CFLAGS="-pipe -O2 -fPIE"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-pie"
./configure
Terminal output:
checking whether the C compiler works... no
configure: error: in `/home/riley/Desktop/transmission-2.77':
configure: error: C compiler cannot create executables
See `config.log' for more details
Relevant content in config.log:
configure:3759: checking whether the C compiler works
configure:3781: gcc -pipe -O2 -fPIE -Wl,-pie conftest.c >&5
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: relocation R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
--- End Message ---
--- Begin Message ---
- To: Rick Terrel <rickterrel@gmail.com>
- Cc: 701461-done@bugs.debian.org
- Subject: Bug#701461: gcc cannot compile in amd64 using -fPIE and -pie
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Wed, 8 May 2013 01:39:01 +0200
- Message-id: <20130507233901.GA12268@volta.aurel32.net>
- In-reply-to: <CAK1K-GgAg9JVCyV6NePJvcY56O=Avebww7zOfM4BruBVWV7NOQ@mail.gmail.com>
- References: <CAK1K-GgAg9JVCyV6NePJvcY56O=Avebww7zOfM4BruBVWV7NOQ@mail.gmail.com>
On Sat, Feb 23, 2013 at 01:55:47PM +0100, Rick Terrel wrote:
> Package: gcc
> Version: 4:4.7.2-1
> Severity: important
>
> gcc cannot compile programs in amd64 with the -fPIE and -pie security
> flags. It seems that crt1.o is not compiled with -fPIC. I tested this with
Which is expected. Scrt1.o should be used instead.
> the "transmission" package:
>
> Flags used:
>
> export CFLAGS="-pipe -O2 -fPIE"
> export CXXFLAGS="${CFLAGS}"
> export LDFLAGS="-Wl,-pie"
> ./configure
>
> Terminal output:
>
> checking whether the C compiler works... no
> configure: error: in `/home/riley/Desktop/transmission-2.77':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
>
> Relevant content in config.log:
>
> configure:3759: checking whether the C compiler works
> configure:3781: gcc -pipe -O2 -fPIE -Wl,-pie conftest.c >&5
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against `__libc_csu_fini' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: could
> not read symbols: Bad value
> collect2: error: ld returned 1 exit status
You should not try to override linker flags, but instead teach gcc to
pass the correct flags. You should pass '-pie' to gcc instead of
'-Wl,-pie'.
Closing the bug.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
--- End Message ---
Reply to: