Public bug reported:

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/petscdir/3.1/$PETSC_ARCH/conf/configure.log, see the tests
checkPIC and checkSharedLinker). Normally the test fails with '-PIC', so
it moves on to try '-fPIC' which works correctly for building shared
libraries.

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)

** Affects: gcc-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug armhf petsc precise

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1087171

Title:
  Command line option -PIC accepted on armhf but nowhere else?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1087171/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to