From 3df93c42e41535f24f194dffbbbd41c90921fe23 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Tue, 18 Feb 2014 10:53:24 +0000 Subject: [PATCH] Bugfix: compilation was not working on recent 64-bit Ubuntu versions. This patch addresses two 64-bit platform compilation issues: - Force 32-bit mode for gcc using '-m32' - Recent library modifications broke the 32-bit compilation on 64-bit machines: updated 'compile.txt' to include the need for the 'gcc-multilib' package. --- src/BuildUnix-Win32.cmake | 2 +- src/BuildUnix.cmake | 2 +- src/compile.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/BuildUnix-Win32.cmake b/src/BuildUnix-Win32.cmake index 9f58fbb..c57f115 100644 --- a/src/BuildUnix-Win32.cmake +++ b/src/BuildUnix-Win32.cmake @@ -15,7 +15,7 @@ set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # to get rid of -rdynamic set (CMAKE_C_FLAGS "-DFORWINDOWS") # Static where possible (i.e. only not on the APPLE) -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -m32") set (scythername "scyther-w32.exe") add_executable (${scythername} ${Scyther_sources}) diff --git a/src/BuildUnix.cmake b/src/BuildUnix.cmake index 49f6ddf..66404f3 100644 --- a/src/BuildUnix.cmake +++ b/src/BuildUnix.cmake @@ -9,7 +9,7 @@ message (STATUS "Building Linux version") # Static where possible (i.e. only not on the APPLE) -set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -m32") set (scythername "scyther-linux") add_executable (${scythername} ${Scyther_sources}) diff --git a/src/compile.txt b/src/compile.txt index 45440cc..4314fbb 100644 --- a/src/compile.txt +++ b/src/compile.txt @@ -21,6 +21,9 @@ Needed: [cmake] A Makefile generator, available on almost any platform. + [gcc-multilib] + Some 64-bit platforms need this to enable 32-bit compilation. + For cross-compilation (Windows):