Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Nov 2018 06:07:45 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r483961 - head/databases/p5-DBD-Oracle
Message-ID:  <201811040607.wA467jC8083044@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811040607.wA467jC8083044>