aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authoreugen <eugen@FreeBSD.org>2018-11-04 14:07:45 +0800
committereugen <eugen@FreeBSD.org>2018-11-04 14:07:45 +0800
commit19de7e789437993c4dd5925bf5f8ce8e43bea628 (patch)
treec258fec4bcdf7b83e782596c3d733398c283f4ef /databases
parent71f1ac8995dc93b46437fe24ab4577068bd43d55 (diff)
downloadfreebsd-ports-gnome-19de7e789437993c4dd5925bf5f8ce8e43bea628.tar.gz
freebsd-ports-gnome-19de7e789437993c4dd5925bf5f8ce8e43bea628.tar.zst
freebsd-ports-gnome-19de7e789437993c4dd5925bf5f8ce8e43bea628.zip
databases/p5-DBD-Oracle: fix build using lld
While using LLVM's lld linker as /usr/bin/ld the build breaks because Oracle supplied libs built without -fPIC: can't create dynamic relocation R_386_32 ... in readonly segment It is not possible to recompile Oracle object files with -fPIC, so fix this overriding lld's default and make it the same as GNU ld allowing .text relocations. This fixes build error, so no PORTREVISION bump. Reported by: emaste
Diffstat (limited to 'databases')
-rw-r--r--databases/p5-DBD-Oracle/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/databases/p5-DBD-Oracle/Makefile b/databases/p5-DBD-Oracle/Makefile
index e2f0a01b1119..b930dc2c92dd 100644
--- a/databases/p5-DBD-Oracle/Makefile
+++ b/databases/p5-DBD-Oracle/Makefile
@@ -19,6 +19,7 @@ OPTIONS_DEFINE= EXAMPLES
USES= perl5 shebangfix
USE_PERL5= configure patch
CONFIGURE_ENV= ORACLE_HOME="${ORACLE_HOME}"
+LDFLAGS_i386= -Wl,-znotext
SHEBANG_FILES= Oracle.ex/*
@@ -28,6 +29,11 @@ ORACLE_HOME= ${LOCALBASE}/oracle8-client
BUILD_DEPENDS+= ${ORACLE_HOME}/lib/libclntst8.a:databases/oracle8-client
CONFIGURE_ARGS= -V 8.1.7
+.if ${ARCH} == "i386"
+CONFIGURE_ARGS+= LDDLFLAGS="`${PERL} -MConfig -e 'print $$Config{lddlflags}'` \
+ ${LDFLAGS_i386}"
+.endif
+
post-patch:
@${MV} ${WRKSRC}/Oracle.ex/README ${WRKSRC}/Oracle.ex/Readme
@${REINPLACE_CMD} -E -e 's!([, ][&!]?)na\)!\1PL_na)!g' \