provide-fPIC-method-for-amd64-20040508
authorDerrick Brashear <shadow@dementia.org>
Mon, 10 May 2004 04:18:58 +0000 (04:18 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 10 May 2004 04:18:58 +0000 (04:18 +0000)
FIXES 3680

allow building fPIC on amd64

src/cf/osconf.m4
src/config/Makefile.config.in
src/config/Makefile.version-NOCML.in
src/lwp/Makefile.in
src/rxkad/Makefile.in
src/sys/Makefile.in

index 32334d7..751444e 100644 (file)
@@ -5,6 +5,7 @@ dnl defaults, override in case below as needed
 XCFLAGS='${DBG} ${OPTMZ}'
 SHLIB_SUFFIX="so"
 CC="cc"
+CCOBJ="cc"
 MT_CC="cc"
 XLIBS="${LIB_AFSDB}"
 
@@ -123,6 +124,7 @@ case $AFS_SYSNAME in
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
+               CCOBJ="/opt/ansic/bin/cc"
                DBM="/lib/libndbm.a"
                LD="/bin/ld   "
                LEX="/opt/langtools/bin/lex"
@@ -154,6 +156,7 @@ case $AFS_SYSNAME in
                AR="/usr/bin/ar"
                AS="/usr/ccs/bin/as"
                CC="/opt/ansic/bin/cc"
+               CCOBJ="/opt/ansic/bin/cc"
                DBM="/lib/hpux32/libndbm.so"
                LD="/bin/ld   "
                LEX="/opt/langtools/bin/lex"
@@ -252,6 +255,7 @@ case $AFS_SYSNAME in
 
        i386_linux22)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -267,6 +271,7 @@ case $AFS_SYSNAME in
 
        i386_umlinux22)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -282,6 +287,7 @@ case $AFS_SYSNAME in
 
        i386_linux24)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -301,6 +307,7 @@ case $AFS_SYSNAME in
 
        i386_umlinux24)
                CC="gcc -pipe"
+               CCOBJ="gcc -pipe"
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -447,6 +454,7 @@ case $AFS_SYSNAME in
 
        s390_linux22)
                CC="gcc"
+               CCOBJ="gcc"
                LD="gcc"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -463,6 +471,7 @@ case $AFS_SYSNAME in
 
        s390_linux24)
                CC="gcc"
+               CCOBJ="gcc"
                LD="gcc"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -524,6 +533,7 @@ case $AFS_SYSNAME in
        sgi_65)
                AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
                CC="/usr/bin/cc"
+               CCOBJ="/usr/bin/cc"
                FSINCLUDES="-I/usr/include/sys/fs"
                LD="/usr/bin/ld"
                LEX="lex"
@@ -580,6 +590,7 @@ case $AFS_SYSNAME in
        sun4_413)
                CCXPG2="/usr/xpg2bin/cc"
                CC="gcc"
+               CCOBJ="gcc"
                LEX="lex"
                SHLIB_CFLAGS="-PIC"
                TXLIBS="-lcurses -ltermcap"
@@ -592,6 +603,7 @@ case $AFS_SYSNAME in
 
        sun4x_55)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
                MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
@@ -608,6 +620,7 @@ case $AFS_SYSNAME in
 
        sun4x_56)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
                MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
@@ -627,6 +640,7 @@ case $AFS_SYSNAME in
 
        sun4x_57)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -647,6 +661,7 @@ case $AFS_SYSNAME in
 
        sun4x_58)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -667,6 +682,7 @@ case $AFS_SYSNAME in
 
        sun4x_59)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -687,6 +703,7 @@ case $AFS_SYSNAME in
 
        sunx86_57)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -708,6 +725,7 @@ case $AFS_SYSNAME in
 
        sunx86_58)
                CC="/opt/SUNWspro/bin/cc"
+               CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
@@ -791,6 +809,7 @@ if test "x$enable_optimize_lwp" = "xno"; then
 fi
 
 AC_SUBST(CCXPG2)
+AC_SUBST(CCOBJ)
 AC_SUBST(AFSD_LIBS)
 AC_SUBST(AFSD_LDFLAGS)
 AC_SUBST(AIX64)
index cff607e..9c3161a 100644 (file)
@@ -32,6 +32,7 @@ AS = @AS@
 AFSD_LIBS = @AFSD_LIBS@
 AFSD_LDFLAGS = @AFSD_LDFLAGS@
 CC = @CC@
+CCOBJ = @CCOBJ@
 CCXPG2 = @CCXPG2@
 CFLAGS = @CFLAGS@
 CP = @CP@
@@ -126,3 +127,6 @@ COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
 
 CFLAGS=${COMMON_CFLAGS} ${XCFLAGS}
 LDFLAGS=${XLDFLAGS}
+
+.c.o:
+       $(CCOBJ) $(CFLAGS) -c $<
index 1e57db5..084d0b7 100644 (file)
@@ -13,3 +13,4 @@ AFS_component_version_number.o: AFS_component_version_number.c
 AFS_component_version_number.c: 
        echo 'char cml_version_number[]="@(#) OpenAFS ${VERSION} built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c
        echo 'char* AFSVersion = "${PACKAGE} ${VERSION}"; ' >>AFS_component_version_number.c
+
index ca0d1cd..ec46254 100644 (file)
@@ -34,15 +34,15 @@ process.s:
 process.o      : process.s process.i386.s process.c
        @case "$(SYS_NAME)" in \
        pmax_he1) \
-               $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
+               $(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
        sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5?) \
                /usr/ccs/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
                ${AS} process.ss -o process.o; \
                        $(RM) process.ss ;; \
        sgi_5* ) \
-               $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
+               $(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
        sgi_61 | sgi_62 | sgi_63 ) \
-               $(CC) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
+               $(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
        s390*) \
                /lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s >process.ss; \
                ${AS} -ahlns process.ss -o process.o >process.lst; \
@@ -52,7 +52,7 @@ process.o     : process.s process.i386.s process.c
        i386_*bsd*) \
                echo foo ; \
                cp ${srcdir}/process.i386.s process.S ; \
-               ${CC} -E -I${srcdir} -I${TOP_INCDIR} process.S >process.ss ; \
+               ${CCOBJ} -E -I${srcdir} -I${TOP_INCDIR} process.S >process.ss ; \
                ${AS} process.ss -o process.o ;  \
                $(RM) -f process.S ;;\
        ncrx86_* | sunx86_*) \
@@ -64,7 +64,7 @@ process.o     : process.s process.i386.s process.c
                ${AS} -o process.o process.ss; \
                $(RM) process.ss ;; \
        hp* | *_linux* | *_umlinux* | sgi_64 | sgi_65 ) \
-               ${CC} ${CFLAGS} -c ${srcdir}/process.c;; \
+               ${CCOBJ} ${CFLAGS} -c ${srcdir}/process.c;; \
        alpha_osf1 | alpha_osf20 |  alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
                ${AS} -v  -P -DOSF -I${TOP_INCDIR} -DASSEMBLER ${srcdir}/process.s; \
                ${AS} -v process.i -o process.o;; \
@@ -81,15 +81,15 @@ process.o   : process.s process.i386.s process.c
        esac
 
 iomgr.o                : iomgr.c lwp.h timer.h
-               ${CC} -c ${CFLAGS} ${srcdir}/iomgr.c
+               ${CCOBJ} -c ${CFLAGS} ${srcdir}/iomgr.c
 
 preempt.o      : preempt.c lwp.h preempt.h
 lwp.o          : lwp.c lwp.h
        case "$(SYS_NAME)" in \
                rs_aix*) \
-                       $(CC) ${LWP_DBG} ${LWP_OPTMZ} -I${srcdir} -I. -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -c ${srcdir}/lwp.c;; \
+                       $(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -I${srcdir} -I. -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -c ${srcdir}/lwp.c;; \
                *)  \
-                       $(CC) ${CFLAGS} -c ${srcdir}/lwp.c;; \
+                       $(CCOBJ) ${CFLAGS} -c ${srcdir}/lwp.c;; \
                esac
 lock.o         : lock.c lock.h lwp.h
 timer.o                : timer.c
index 0c2a595..40d1b6f 100644 (file)
@@ -90,7 +90,7 @@ md4.o: md4.c ${INCLS}
 md5.o: md5.c ${INCLS}
 
 fcrypt.o: fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
-       ${CC} ${CFLAGS} -c fcrypt.c
+       ${CCOBJ} ${CFLAGS} -c fcrypt.c
 
 tcrypt: tcrypt.o librxkad.a 
        ${CC} -o tcrypt tcrypt.o librxkad.a
index 28b48b4..23033ff 100644 (file)
@@ -66,7 +66,7 @@ syscall.o: syscall.s
        esac
 
 afssyscalls.o: afssyscalls.c afssyscalls.h
-       ${CC} ${CFLAGS} -c ${srcdir}/afssyscalls.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/afssyscalls.c
 
 rmtsysnet.o rmtsysc.o rmtsyss.o rmtsysd.o: rmtsys.h
 rmtsysd: AFS_component_version_number.o afs.exp afsl.exp