DragonFly BSD
DragonFly bugs List (threaded) for 2004-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: linux module problem with new kernel


From: YONETANI Tomokazu <qhwt+dragonfly-bugs@xxxxxxxxxx>
Date: Sun, 22 Feb 2004 10:12:05 +0900

On Sat, Feb 21, 2004 at 04:30:52PM -0800, Rob Schulhof wrote:
>   As far as I can tell, the  problem with the linux module is in the
> makefile's use of the -fno-common option when compiling
> src/sys/emulation/linux/i386/linux_genassym.c.  This causes the symbols to
> be included  in the BSS section of the object file and causes the
> src/sys/kern/genassym.sh to write an empty linux_assym.h file because the
> symbols are no longer in 'common' blocks.  I'm still sorting through the
> cvs changes to find the cause...

dillon      2004/02/16 11:57:40 PST

DragonFly src repository

  Modified files:
    sys/conf             Makefile.amd64 Makefile.i386 bsd.kern.mk
                         files.i386
  Log:
  Compile the kernel with -fno-common to guarentee that we do not accidently
  put non-extern'd variable declarations in header files.  Our module loader
  no longer deals with commons so duplicate declarations can cause kldloaded
  modules to fail, and its sloppy programming anyway.

  Revision  Changes    Path
  1.2       +1 -1      src/sys/conf/Makefile.amd64
  1.12      +1 -1      src/sys/conf/Makefile.i386
  1.4       +5 -0      src/sys/conf/bsd.kern.mk
  1.14      +2 -2      src/sys/conf/files.i386


svr4 is already fixed this way, but with different commit log.

Index: sys/emulation/linux/Makefile
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/emulation/linux/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- sys/emulation/linux/Makefile	31 Jan 2004 06:56:43 -0000	1.4
+++ sys/emulation/linux/Makefile	22 Feb 2004 00:58:43 -0000
@@ -30,7 +30,7 @@
 	    ${.IMPSRC} -o ${.TARGET}
 
 linux_genassym.o: linux_genassym.c linux.h @ machine
-	${CC} -c ${CFLAGS} ${.IMPSRC}
+	${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
 
 opt_compat.h:
 	echo "#define COMPAT_43 1" > opt_compat.h



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]