Skip to content

Commit

Permalink
Fix build so that it works with clang.
Browse files Browse the repository at this point in the history
make USE_CLANG=1 USE_GCC=0
  • Loading branch information
ViralBShah committed Nov 19, 2011
1 parent e748646 commit 8d2b5cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FC = gfortran
CFLAGS = -pipe -std=gnu99 -fPIC
CXXFLAGS = -pipe -fPIC -fno-rtti
DEBUGFLAGS = -ggdb3 -DDEBUG
SHIPFLAGS = -O3 -DNDEBUG
SHIPFLAGS = -O3 -DNDEBUG -falign-functions
endif

ifeq ($(USECLANG),1)
Expand All @@ -34,7 +34,7 @@ CXX = clang++
CFLAGS = -fPIC -fexceptions -pipe
CXXFLAGS = -fPIC -fno-rtti -fexceptions -pipe
DEBUGFLAGS = -g -DDEBUG
SHIPFLAGS = -O4 -DNDEBUG
SHIPFLAGS = -O3 -DNDEBUG

This comment has been minimized.

Copy link
@StefanKarpinski

StefanKarpinski Nov 19, 2011

Member

I bet this was the culprit, huh?

This comment has been minimized.

Copy link
@ViralBShah

ViralBShah via email Nov 19, 2011

Author Member

This comment has been minimized.

Copy link
@StefanKarpinski

StefanKarpinski Nov 19, 2011

Member

Oh, I didn't even try it yet. Will give it a shot later.

endif

# OS specific stuff
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FLISPDIR = ./flisp
SUPPORT = $(SUPPORTDIR)/libsupport.a
FLISP = $(FLISPDIR)/libflisp.a

FLAGS = -falign-functions -Wall -Wno-strict-aliasing -fno-omit-frame-pointer \
FLAGS = -Wall -Wno-strict-aliasing -fno-omit-frame-pointer \
-I$(FLISPDIR) -I$(SUPPORTDIR) -fvisibility=hidden -fno-common \
-I$(shell $(LLVMROOT)/bin/llvm-config --includedir)
DEBUGFLAGS += $(FLAGS)
Expand Down
12 changes: 8 additions & 4 deletions ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ else
READLINE = -lncurses $(EXTROOT)/lib/libreadline.a
endif

FLAGS = -falign-functions -Wall -Wno-strict-aliasing \
-fno-omit-frame-pointer \
FLAGS = -Wall -Wno-strict-aliasing -fno-omit-frame-pointer \
-I$(JULIAHOME)/src -I$(LLTDIR) -I$(EXTROOT)/include $(CFLAGS)
DEBUGFLAGS += $(FLAGS) -static-libgcc -static-libstdc++
SHIPFLAGS += $(FLAGS) -static-libgcc -static-libstdc++
DEBUGFLAGS = $(FLAGS)
SHIPFLAGS = $(FLAGS)

ifeq ($(USEGCC),1)
DEBUGFLAGS += -static-libgcc -static-libstdc++
SHIPFLAGS += -static-libgcc -static-libstdc++
endif

LIBJULIA_RELEASE = $(JULIAHOME)/src/libjulia-release.a
LIBJULIA_DEBUG = $(JULIAHOME)/src/libjulia-debug.a
Expand Down

0 comments on commit 8d2b5cc

Please sign in to comment.