[SCM] Samba Shared Repository - branch master updated

Björn Jacke bjacke at samba.org
Mon May 24 05:51:11 MDT 2010


The branch, master has been updated
       via  8e069e2... s3: major overhaul of compiler and linker flags for HP-UX builds
       via  4c65943... s3:Makefile: set PIE flags also for nss_winbind
      from  2466dc7... s3:build: remove CFLAGS from LDSHFLAGS, SHLD has them already

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8e069e245bdda1303e9c2bd3b9e30be98f9d8680
Author: Björn Jacke <bj at sernet.de>
Date:   Wed May 12 18:17:30 2010 +0200

    s3: major overhaul of compiler and linker flags for HP-UX builds
    
    this will fix a number of things like shared library builds. That in turn will
    probably trigger some other build bugs...

commit 4c659433c09823c2ea34ac73fad3686f917ac609
Author: Björn Jacke <bj at sernet.de>
Date:   Mon May 24 13:41:12 2010 +0200

    s3:Makefile: set PIE flags also for nss_winbind

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in  |    2 +-
 source3/configure.in |   36 +++++++++++++++++++++++++++---------
 2 files changed, 28 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index bd48d10..f895374 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -50,7 +50,7 @@ LDSHFLAGS=@PIE_LDFLAGS@ @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_D
 LDSHFLAGS_MODULES=@PIE_LDFLAGS@ @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
 LDFLAGS=@PIE_LDFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
 
-WINBIND_NSS_LDSHFLAGS=@WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
+WINBIND_NSS_LDSHFLAGS=@PIE_LDFLAGS@ @WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
 AWK=@AWK@
 PICFLAG=@PICFLAG@
 DYNEXP=@DYNEXP@
diff --git a/source3/configure.in b/source3/configure.in
index 1928490..0de524d 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1650,25 +1650,43 @@ DSO_EXPORTS=""
 			AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work correctly])
 			;;
 		*hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
-			# Use special PIC flags for the native HP-UX compiler.
-				BLDSHARED="true"
-				SHLD="cc"
-				LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
-				SONAMEFLAG="-Wl,+h "
-				PICFLAG="+z"
+			# ia64: 64bit build using gcc with CFLAGS="-mpl64"
+			#       64bit build using HP's cc with CFLAGS="+DD64"
+			# hppa: 64bit build unsupported by gcc
+			#       64bit build using HP's cc with CFLAGS="+DA2.0w"
+			# HP-UX 11.00 ld needs PHSS_33034
+			BLDSHARED="true"
 			if test "${GCC}" = "yes"; then
 				PICFLAG="-fPIC"
+				LDSHFLAGS="-shared"
 			else
-				PICFLAG="+z +ESnolit"
+				PICFLAG="+z"
+				LDSHFLAGS="-Wl,-B,symbolic,-b"
+				if test "$host_cpu" != "ia64"; then
+					# "don't store literals in read-only memory" (?):
+					PICFLAG="$PICFLAG +ESnolit"
+				fi
 			fi
 			if test "$host_cpu" = "ia64"; then
 				SHLIBEXT="so"
-			      PICFLAG="+z"
-				DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
+				# TODO: does the linker find the right 32/64 bit version of the libs? :
+				DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32:/usr/local/lib/hpux64:/usr/lib/hpux64"
 			else
 				SHLIBEXT="sl"
 				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
 			fi
+			if test "$ac_cv_prog_gnu_ld" = "yes"; then
+				SONAMEFLAG="-Wl,-soname="
+			else
+				SONAMEFLAG="-Wl,+h,"
+			fi
+			# PIE/PIC flags at link time are required on HP-UX because
+			# linking requires a temporary source file, which is being
+			# compiled with the indicated flags - which need to contain
+			# PIC flags when we don't support PIE flags:
+			if test "$PIE_LDFLAGS" = "" ; then
+				PIE_LDFLAGS=\${PICFLAG}
+			fi
 			AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
 			AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need a mask element])
 			;;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list