Author: kevans
Date: Thu Apr 30 13:48:58 2020
New Revision: 360494
URL: https://svnweb.freebsd.org/changeset/base/360494

Log:
  MFC r360071-r360072: force -fcommon for parts of kernel/kmods that need
  
  Note that this isn't a 1:1 MFC, as a couple more instances needed to be
  patched to force -fcommon in the face of a compiler that defaulted to
  -fno-common.
  
  r360071:
  Allow kernel modules to build with a compiler that defaults to -fno-common
  
  This uses the same approach as r359691.
  
  r360072:
  More fixes to build the kernel with a compiler that defaults to -fno-common
  
  Using the same approach as the last commit for the files used by genassym.sh.

Modified:
  stable/11/sys/conf/files.amd64
  stable/11/sys/conf/files.i386
  stable/11/sys/conf/files.pc98
  stable/11/sys/conf/kern.post.mk
  stable/11/sys/conf/kmod.mk
  stable/11/sys/modules/linux/Makefile
  stable/11/sys/modules/linux64/Makefile
  stable/11/sys/modules/vmm/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files.amd64
==============================================================================
--- stable/11/sys/conf/files.amd64      Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/conf/files.amd64      Thu Apr 30 13:48:58 2020        
(r360494)
@@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o                optional        
compat_cloudabi64       \
 #
 linux32_genassym.o             optional        compat_linux32          \
        dependency      "$S/amd64/linux32/linux32_genassym.c"           \
-       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
+       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c 
${.IMPSRC}" \
        no-obj no-implicit-rule                                         \
        clean           "linux32_genassym.o"
 #
@@ -58,7 +58,7 @@ linux32_vdso.so               optional        compat_linux32  
                \
 #
 ia32_genassym.o                        standard                                
\
        dependency      "$S/compat/ia32/ia32_genassym.c"                \
-       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
+       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c 
${.IMPSRC}" \
        no-obj no-implicit-rule                                         \
        clean           "ia32_genassym.o"
 #

Modified: stable/11/sys/conf/files.i386
==============================================================================
--- stable/11/sys/conf/files.i386       Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/conf/files.i386       Thu Apr 30 13:48:58 2020        
(r360494)
@@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o                optional        
compat_cloudabi32       \
 #
 linux_genassym.o               optional        compat_linux            \
        dependency      "$S/i386/linux/linux_genassym.c"                \
-       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
+       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c 
${.IMPSRC}" \
        no-obj no-implicit-rule                                         \
        clean           "linux_genassym.o"
 #
@@ -45,7 +45,7 @@ linux_vdso.so                 optional        compat_linux    
        \
 #
 svr4_genassym.o                        optional        compat_svr4             
\
        dependency      "$S/i386/svr4/svr4_genassym.c"                  \
-       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \
+       compile-with    "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c 
${.IMPSRC}" \
        no-obj no-implicit-rule                                         \
        clean           "svr4_genassym.o"
 #

Modified: stable/11/sys/conf/files.pc98
==============================================================================
--- stable/11/sys/conf/files.pc98       Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/conf/files.pc98       Thu Apr 30 13:48:58 2020        
(r360494)
@@ -11,7 +11,7 @@
 #
 linux_genassym.o               optional        compat_linux            \
        dependency      "$S/i386/linux/linux_genassym.c"                \
-       compile-with    "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}"    \
+       compile-with    "${CC} ${CFLAGS:N-fno-common} -fcommon -c ${.IMPSRC}"   
\
        no-obj no-implicit-rule                                         \
        clean           "linux_genassym.o"
 #
@@ -35,7 +35,7 @@ linux_vdso.so                 optional        compat_linux    
        \
 #
 svr4_genassym.o                        optional        compat_svr4             
\
        dependency      "$S/i386/svr4/svr4_genassym.c"                  \
-       compile-with    "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}"    \
+       compile-with    "${CC} ${CFLAGS:N-fno-common} -fcommon -c ${.IMPSRC}"   
\
        no-obj no-implicit-rule                                         \
        clean           "svr4_genassym.o"
 #

Modified: stable/11/sys/conf/kern.post.mk
==============================================================================
--- stable/11/sys/conf/kern.post.mk     Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/conf/kern.post.mk     Thu Apr 30 13:48:58 2020        
(r360494)
@@ -196,7 +196,7 @@ assym.s: $S/kern/genassym.sh genassym.o
        NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > 
${.TARGET}
 
 genassym.o: $S/$M/$M/genassym.c
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon $S/$M/$M/genassym.c
 
 OBJS_DEPEND_GUESS+= opt_global.h
 genassym.o vers.o: opt_global.h

Modified: stable/11/sys/conf/kmod.mk
==============================================================================
--- stable/11/sys/conf/kmod.mk  Thu Apr 30 12:02:13 2020        (r360493)
+++ stable/11/sys/conf/kmod.mk  Thu Apr 30 13:48:58 2020        (r360494)
@@ -468,7 +468,7 @@ assym.s: ${SYSDIR}/kern/genassym.sh
        sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
 genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
 genassym.o: ${SRCS:Mopt_*.h}
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \
            ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
 .endif
 

Modified: stable/11/sys/modules/linux/Makefile
==============================================================================
--- stable/11/sys/modules/linux/Makefile        Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/modules/linux/Makefile        Thu Apr 30 13:48:58 2020        
(r360494)
@@ -73,7 +73,7 @@ ${VDSO}.so: linux${SFX}_locore.o
 .endif
 
 linux${SFX}_genassym.o:
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
 .if !defined(KERNBUILDDIR)
 .if defined(KTR)

Modified: stable/11/sys/modules/linux64/Makefile
==============================================================================
--- stable/11/sys/modules/linux64/Makefile      Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/modules/linux64/Makefile      Thu Apr 30 13:48:58 2020        
(r360494)
@@ -45,7 +45,7 @@ linux_support.o: assym.s linux_assym.h
            ${.IMPSRC} -o ${.TARGET}
 
 linux_genassym.o:
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
 .if !defined(KERNBUILDDIR)
 .if defined(DEBUG)

Modified: stable/11/sys/modules/vmm/Makefile
==============================================================================
--- stable/11/sys/modules/vmm/Makefile  Thu Apr 30 12:02:13 2020        
(r360493)
+++ stable/11/sys/modules/vmm/Makefile  Thu Apr 30 13:48:58 2020        
(r360494)
@@ -74,9 +74,9 @@ svm_support.o:
            ${.IMPSRC} -o ${.TARGET}
 
 vmx_genassym.o:
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
 svm_genassym.o:
-       ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC}
+       ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
 .include <bsd.kmod.mk>
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to