[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1121530: libreoffice: Please build with -fPIE on sparc64 to fix FTBFS



On Thursday 2025-11-27 22:13, John Paul Adrian Glaubitz wrote:
>--- debian/rules.orig   2025-11-08 21:28:26.000000000 +0100
>+++ debian/rules        2025-11-27 22:11:18.063514133 +0100
>@@ -1146,6 +1146,11 @@
>        DEB_CXXFLAGS_MAINT_APPEND = -ffp-contract=off
> endif
> 
>+ifneq (,$(filter sparc64,$(DEB_HOST_ARCH)))
>+       DEB_CFLAGS_MAINT_APPEND = -fPIE
>+       DEB_CXXFLAGS_MAINT_APPEND = -fPIE
>+endif

If all you have a "hammer" (e.g. `./configure CFLAGS=-fPIC`), that CFLAGS
variable may be used by the software project for both executables and shared
libraries.

It is possible for the build to fail, since PIE is not meant to
be used when building shared libraries.

If that happens, you have to switch from PIE to PIC (that latter is more
general).

On the other hand, if the software project uses libtool, you are in good hands:
libtool forces -fPIC on shared libs anyway and transparently strips any
conflicting -fPIE internally (it also eats the small model -fpic/-fpie
in favor of -fPIC).


Reply to: