Command line option -PIC accepted on armhf but nowhere else?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-defaults (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following minimal test case reproduces the problem:
echo "int main () {}" > test.c && gcc -c -o test.o test.c && gcc -o test -PIC test.o && echo "succeeds"
On every other architecture I've tried, the -PIC flag results in "gcc: error: unrecognized option '-PIC'" which is the typically expected behavior here. Apologies if this counts as a linker bug and should not be filed under gcc.
The unexpected success on armhf in Precise is confusing the build system of PETSc such that package libpetsc3.1-dev is failing to build shared libraries. If this is actually a feature rather than a bug of this version/arch of gcc or ld then this could be considered a bug in PETSc's build system instead.
You can see the effect this has on PETSc in its configure.log (/usr/lib/
It does look as though this has been fixed in Quantal, but the unexpected behavior remains in Precise.
ProblemType: Bug
DistroRelease: Linaro 12.11
Package: gcc 4:4.6.3-1ubuntu5
Uname: Linux 3.2.1-linaro-omap armv7l
ApportVersion: 2.0.1-0ubuntu15
Architecture: armhf
Date: Thu Dec 6 08:24:38 2012
MarkForUpload: True
ProcEnviron:
TERM=xterm
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
Update: on Quantal, the bug is fixed with gcc-4.7, but still present with gcc-4.6.