From de23f29722aa8433eb2fc69233e5a4d1970f1333 Mon Sep 17 00:00:00 2001 From: Lev Kujawski Date: Mon, 1 Feb 2021 17:06:48 -0700 Subject: [PATCH] Avoid Global Offset Table (GOT) limits by enabling -fPIC on the BSDs. config/cf/bsdLib.rules: Switch -fpic to -fPIC lib/DtXinerama/Imakefile: Use $(PICFLAGS) instead of -fpic Several tickets have been opened by users encountering the low 8KiB GOT limit on SPARC systems running BSD. This change makes CDE builds on BSD more consistent with those on Linux, where -fPIC has been the default without any reported issues. --- cde/config/cf/bsdLib.rules | 2 +- cde/lib/DtXinerama/Imakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/config/cf/bsdLib.rules b/cde/config/cf/bsdLib.rules index c55b67c62..f0351aeab 100644 --- a/cde/config/cf/bsdLib.rules +++ b/cde/config/cf/bsdLib.rules @@ -23,7 +23,7 @@ XCOMM $XConsortium: bsdLib.rules /main/3 1996/09/28 16:09:18 rws $ #define SharedLibraryLoadFlags -shared #endif #ifndef PositionIndependentCFlags -#define PositionIndependentCFlags -fpic +#define PositionIndependentCFlags -fPIC #endif /* diff --git a/cde/lib/DtXinerama/Imakefile b/cde/lib/DtXinerama/Imakefile index 3186345d1..1b3b0a25c 100644 --- a/cde/lib/DtXinerama/Imakefile +++ b/cde/lib/DtXinerama/Imakefile @@ -40,7 +40,7 @@ OBJS = DtXinerama.o INCLUDES = -I. XCOMM -fpic is required for static libDtXinerama to link with libDtSvc properly -CCOPTIONS += -fpic +CCOPTIONS += $(PICFLAGS) DependTarget()