From ac99bf2c5cdf86f039a290397614ca042a56c8db Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Fri, 18 Nov 2011 16:36:12 -0500 Subject: Detect 32bit support on 64bit OS and compile with -m32 if found For gcc compiler only at the moment. The configuration reports if support is found or not, e.g.: checking if gcc supports the -m32 Intel/AMD option... yes The configuration C test relies on #include unistd.h which includes features.h which includes gnu/stubs.h which includes gnu/stubs-32.h which is missing on 64 bit system without the 32 bit library support. Tested on x86_64 AMD64 CPU with/without libc6-dev-i386 which provides 32 bit support. Remains to be tested on Geode and FreeBSD 32/64 bit. The configuration does not attempt to decide if building should proceed or be aborted. If no 32 bit support then the build will die in the assembly code as it always did before. The variable M32_CFLAGS provides the flag for the makefiles. The variable names and organization is subject to change. Signed-off-by: Gaetan Nadon --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index d5f57b9..86139de 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,6 +35,7 @@ AM_CFLAGS = \ $(XORG_CFLAGS) \ $(CWARNFLAGS) \ $(AMD_CFLAGS) \ + $(M32_CFLAGS) \ -DHAVE_GX \ -DHAVE_LX \ -DOPT_ACCEL -- cgit v1.2.3