Skip to content

Commit bcf8ff3

Browse files
committed
Update documentation for building cbmc on windows.
Update makefiles to use reasonable default compiler for cygwin build. Allow alternative downloader selection from make command line.
1 parent 728dbb5 commit bcf8ff3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ clean: $(patsubst %, %_clean, $(DIRS))
6363
$(patsubst %, %_clean, $(DIRS)):
6464
$(MAKE) $(MAKEARGS) -C $(patsubst %_clean, %, $@) clean ; \
6565

66-
# minisat 2 download, for your convenience
66+
# minisat2 and glucose download, for your convenience
67+
68+
DOWNLOADER = lwp-download
6769

6870
minisat2-download:
6971
@echo "Downloading Minisat 2.2.1"
70-
@lwp-download http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
72+
@$(DOWNLOADER) http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
7173
@tar xfz minisat2_2.2.1.orig.tar.gz
7274
@rm -Rf ../minisat-2.2.1
7375
@mv minisat2-2.2.1 ../minisat-2.2.1
@@ -76,7 +78,7 @@ minisat2-download:
7678

7779
glucose-download:
7880
@echo "Downloading glucose-syrup"
79-
@lwp-download http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz
81+
@$(DOWNLOADER) http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz
8082
@tar xfz glucose-syrup.tgz
8183
@rm -Rf ../glucose-syrup
8284
@mv glucose-syrup ../

src/common

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,19 @@ else ifeq ($(BUILD_ENV_),Cygwin)
101101
CXXFLAGS ?= -Wall -O2
102102
CP_CFLAGS = -MMD -MP
103103
CP_CXXFLAGS += -MMD -MP -std=c++11 -U__STRICT_ANSI__
104+
# Cygwin-g++ has problems with statically linking exception code.
105+
# If linking fails, remove -static.
104106
LINKFLAGS = -static -std=c++11
105107
LINKLIB = ar rcT $@ $^
106-
LINKBIN = $(CXX) $(LINKFLAGS) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LIBS) -static
108+
LINKBIN = $(CXX) $(LINKFLAGS) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LIBS)
107109
LINKNATIVE = $(HOSTCXX) -std=c++11 -o $@ $^ -static
108110
ifeq ($(origin CC),default)
109111
#CC = gcc
110-
CC = i686-w64-mingw32-gcc
112+
CC = x86_64-w64-mingw32-gcc
111113
endif
112114
ifeq ($(origin CXX),default)
113115
#CXX = g++
114-
CXX = i686-w64-mingw32-g++
116+
CXX = x86_64-w64-mingw32-g++
115117
endif
116118
ifeq ($(origin YACC),default)
117119
YACC = bison -y

0 commit comments

Comments
 (0)