svn commit: r483961 - head/databases/p5-DBD-Oracle

Eugene Grosbein eugen at FreeBSD.org
Sun Nov 4 06:07:47 UTC 2018


Author: eugen
Date: Sun Nov  4 06:07:45 2018
New Revision: 483961
URL: https://svnweb.freebsd.org/changeset/ports/483961

Log:
  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

Modified:
  head/databases/p5-DBD-Oracle/Makefile

Modified: head/databases/p5-DBD-Oracle/Makefile
==============================================================================
--- head/databases/p5-DBD-Oracle/Makefile	Sun Nov  4 06:06:27 2018	(r483960)
+++ head/databases/p5-DBD-Oracle/Makefile	Sun Nov  4 06:07:45 2018	(r483961)
@@ -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/*
 
@@ -27,6 +28,11 @@ SHEBANG_FILES=	Oracle.ex/*
 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


More information about the svn-ports-all mailing list