diff --git a/src/afsd/Makefile.in b/src/afsd/Makefile.in index 84e4b6418c..1ea788ed50 100644 --- a/src/afsd/Makefile.in +++ b/src/afsd/Makefile.in @@ -10,6 +10,9 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.pthread +# On AIX, we need to import afsl.exp so the linker can understand that +# syscall() is a syscall provided by libafs. +@AIX_ONLY@AFSD_KERNEL_LDFLAGS=-Wl,-bI:../sys/afsl.exp # # What to make @@ -34,7 +37,7 @@ UAFSLIBS=$(top_builddir)/src/cmd/liboafs_cmd.la \ FUSE_LIBS=@FUSE_LIBS@ -LDFLAGS_afsd = $(AFSD_LDFLAGS) +LDFLAGS_afsd = $(AFSD_LDFLAGS) $(AFSD_KERNEL_LDFLAGS) afsd: afsd.o afsd_kernel.o $(AFSLIBS) $(AFSD_LIBS) $(LT_LDRULE_static) afsd.o afsd_kernel.o $(NON_SHARED) \ $(AFSLIBS) ${AFSD_LIBS} $(LIB_hcrypto) $(LIB_roken) $(MT_LIBS) diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 72c012ca0d..c3d8864ec0 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -708,6 +708,13 @@ else esac fi +dnl For convenience for AIX-only Makefile quirks, comment out all @AIX_ONLY@ +dnl lines in our Makefiles on non-AIX. +AIX_ONLY='#' +AS_CASE([$AFS_SYSNAME], + [rs_aix*], [AIX_ONLY=]) +AC_SUBST([AIX_ONLY]) + dnl add additional checks if compilers support the flags AS_IF([test "x$enable_checking" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Wimplicit-fallthrough], [XCFLAGS], [-Werror]) diff --git a/src/dviced/Makefile.in b/src/dviced/Makefile.in index 086dbe5f0f..bc8b050083 100644 --- a/src/dviced/Makefile.in +++ b/src/dviced/Makefile.in @@ -137,6 +137,7 @@ afsint.ss.o: ../fsint/afsint.ss.c state_analyzer.o: ${VICED}/state_analyzer.c $(AFS_CCRULE) $(VICED)/state_analyzer.c +@AIX_ONLY@LDFLAGS_dafileserver = -Wl,-bI:../sys/afsl.exp dafileserver: ${objects} ${LIBS} $(LT_LDRULE_static) ${objects} \ ${LIBS} $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} diff --git a/src/dvolser/Makefile.in b/src/dvolser/Makefile.in index 41bec98856..b474f7cb91 100644 --- a/src/dvolser/Makefile.in +++ b/src/dvolser/Makefile.in @@ -135,6 +135,7 @@ ihandle.o: ${VOL}/ihandle.c namei_ops.o: ${VOL}/namei_ops.c $(AFS_CCRULE) $(VOL)/namei_ops.c +@AIX_ONLY@LDFLAGS_davolserver = -Wl,-bI:../sys/afsl.exp davolserver: ${objects} ${LIBS} $(LT_LDRULE_static) ${objects} ${LIBS} $(LIB_hcrypto) $(LIB_roken) \ ${MT_LIBS} ${XLIBS} diff --git a/src/tvolser/Makefile.in b/src/tvolser/Makefile.in index 0a7e0c5480..0f0c8e21a8 100644 --- a/src/tvolser/Makefile.in +++ b/src/tvolser/Makefile.in @@ -180,6 +180,7 @@ vos: vos.o ${VOSOBJS} ${VLSERVEROBJS} $(LIBS_client) $(LT_LDRULE_static) vos.o ${VOSOBJS} ${VLSERVEROBJS} $(LIBS_client) \ $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} +@AIX_ONLY@LDFLAGS_volserver = -Wl,-bI:../sys/afsl.exp volserver: ${objects} $(LIBS_server) $(LT_LDRULE_static) ${objects} $(LIBS_server) \ $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} diff --git a/src/viced/Makefile.in b/src/viced/Makefile.in index 46575d74a6..427b81ffb3 100644 --- a/src/viced/Makefile.in +++ b/src/viced/Makefile.in @@ -126,6 +126,7 @@ namei_ops.o: ${VOL}/namei_ops.c afsint.ss.o: ../fsint/afsint.ss.c $(AFS_CCRULE) ../fsint/afsint.ss.c +@AIX_ONLY@LDFLAGS_fileserver = -Wl,-bI:../sys/afsl.exp fileserver: ${objects} ${LIBS} $(LT_LDRULE_static) ${objects} \ ${LIBS} $(LIB_hcrypto) $(LIB_roken) ${MT_LIBS} diff --git a/src/volser/Makefile.in b/src/volser/Makefile.in index 62b1e0bffb..e6437d2f55 100644 --- a/src/volser/Makefile.in +++ b/src/volser/Makefile.in @@ -106,6 +106,7 @@ vos: vos.o libvolser.a ${LIBS} $(AFS_LDRULE) vos.o libvolser.a \ ${LIBS} $(LIB_roken) ${XLIBS} +@AIX_ONLY@LDFLAGS_volserver = -Wl,-bI:../sys/afsl.exp volserver: $(SOBJS) volerr.lo volint.xdr.lo volint.cs.lo \ $(LIBS) ${TOP_LIBDIR}/libdir.a $(AFS_LDRULE) $(SOBJS) .lwp/volerr.o .lwp/volint.xdr.o .lwp/volint.cs.o \