Permalink
Browse files

Build fixes

  • Loading branch information...
1 parent c4ede96 commit b3f40a327a7c8c435e962026f1d97b7a2f171967 @johnmccutchan johnmccutchan committed Aug 6, 2012
Showing with 7 additions and 4 deletions.
  1. +6 −3 Makefile.nacl
  2. +1 −1 nacl-regal.sh
View
@@ -3,8 +3,10 @@ include config/version
SHELL = /bin/sh
ifeq ($(NACL_PACKAGES_BITSIZE), 32)
SYSTEM = nacl-32
+BIN_EXTENSION = .x86.nexe
else
SYSTEM = nacl-64
+BIN_EXTENSION = .x64.nexe
endif
REGAL_NACL = 1
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
@@ -32,6 +34,7 @@ STRIP ?= strip
RM ?= rm -f
LN ?= ln -sf
+CFLAGS.EXTRA = -fno-exceptions -fno-rtti
ifeq ($(MAKECMDGOALS), debug)
OPT = -g
STRIP :=
@@ -273,7 +276,7 @@ endif
# Examples
-regal.bin: lib bin bin/nacl.x64.nexe
+regal.bin: lib bin bin/nacl$(BIN_EXTENSION)
bin:
mkdir bin
@@ -334,14 +337,14 @@ NACLHELLOWORLD.SRCS.NAMES := $(notdir $(NACLHELLOWORLD.SRCS))
NACLHELLOWORLD.OBJS := $(addprefix tmp/$(SYSTEM)/nacl/static/,$(NACLHELLOWORLD.SRCS.NAMES))
NACLHELLOWORLD.OBJS := $(NACLHELLOWORLD.OBJS:.cpp=.o)
NACLHELLOWORLD.CFLAGS := -Iinclude
-NACLHELLOWORLD.LIBS += -Llib -lRegal
+NACLHELLOWORLD.LIBS += -Llib -lRegal -lgcc_s
NACLHELLOWORLD.LIBS += -lm -lpthread
tmp/$(SYSTEM)/nacl/static/%.o: examples/nacl/%.cpp
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(NACLHELLOWORLD.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
-bin/nacl.x64.nexe: $(NACLHELLOWORLD.OBJS) lib/$(LIB.SHARED)
+bin/nacl$(BIN_EXTENSION): $(NACLHELLOWORLD.OBJS) lib/$(LIB.SHARED)
$(LD) -o $@ $^ $(NACLHELLOWORLD.LIBS)
ifneq ($(STRIP),)
$(STRIP) -x $@
View
@@ -12,7 +12,7 @@
readonly PACKAGE_NAME=regal
export NACL_GLIBC=1
-export NACL_PACKAGES_BITSIZE=32
+export NACL_PACKAGES_BITSIZE=64
source ../../build_tools/common.sh

0 comments on commit b3f40a3

Please sign in to comment.