SOLARIS: suppress -xarch=amd64 is deprecated warnings 59/12959/4
authorMichael Meffie <mmeffie@sinenomine.net>
Thu, 25 Jan 2018 23:27:00 +0000 (18:27 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 10 Aug 2018 14:14:00 +0000 (10:14 -0400)
The -m64 flag to specify 64bit builds was introduced in Sun Studio 10, circa
2005. The old flag -xarch=amd64 was deprecated as of Sun Studio 12, circa 2007.
Ever since Sun Studio 12, the compiler complains with a warning message when
the old -xarch=amd64 flag is given:

cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs

Update the cflags when building the Solaris kernel module for x86 to use the
modern -m64 under Solaris 11 or later. Since Solaris 11 has been available
since 2010, it is very unlikely a compiler on Solaris 11 would not support the
modern -m64 flag.

Change-Id: Ib13c00f1c69f34ab1905a8dd4a46c90895046f25
Reviewed-on: https://gerrit.openafs.org/12959
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/libafs/MakefileProto.SOLARIS.in

index 7753066..0c8e41f 100644 (file)
@@ -47,10 +47,14 @@ DBUG= -Wu,-save_args
 KDEFS_32 = -xarch=v8
 KDEFS_64 = -xarch=v9 
 
-<sunx86_58 sunx86_59 sunx86_510 sunx86_511>
+<sunx86_58 sunx86_59 sunx86_510>
 KDEFS_32 = 
 KDEFS_64 = -xarch=amd64 -xmodel=kernel
 
+<sunx86_511>
+KDEFS_32 =
+KDEFS_64 = -m64 -xmodel=kernel
+
 <all>
 CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) @SOLARIS_CC_KOPTS@ ${DBUG}