socsvn commit: r272620 - soc2014/dpl/netmap-ipfwjit

dpl at FreeBSD.org dpl at FreeBSD.org
Mon Aug 18 16:45:25 UTC 2014


Author: dpl
Date: Mon Aug 18 16:45:24 2014
New Revision: 272620
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272620

Log:
  Make it compile decently

Modified:
  soc2014/dpl/netmap-ipfwjit/Makefile.kipfw

Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/Makefile.kipfw	Mon Aug 18 16:31:33 2014	(r272619)
+++ soc2014/dpl/netmap-ipfwjit/Makefile.kipfw	Mon Aug 18 16:45:24 2014	(r272620)
@@ -75,7 +75,7 @@
 #Flags needed for jit.cc
 J_CFLAGS += $(INCDIRS) $(NETMAP_FLAGS)
 J_CFLAGS += -DINET -D_KERNEL -D_BSD_SOURCE -DKERNEL_SIDE -DUSERSPACE
-J_CFLAGS += -I ../extra/ -Wno-extern-c-compat
+J_CFLAGS += -I ../extra/ -Wno-extern-c-compat -Wno-comment #-O2 -Wall -Werror
 
 #ipfw + dummynet section, other parts are not compiled in
 SRCS_IPFW	 = ip_fw2.c ip_fw_pfil.c ip_fw_sockopt.c
@@ -98,7 +98,7 @@
 E_CFLAGS += -Dradix
 MOD := kipfw
 
-LIBS= -lpthread `llvm-config-devel --ldflags --system-libs --libs all`
+LIBS=`llvm-config-devel --ldflags --system-libs --libs all`
 CFLAGS = $(E_CFLAGS)
 
 IPFW_OBJS= $(IPFW_SRCS:%.c=%.o)
@@ -140,8 +140,6 @@
 #       and the ":  = " substitution packs spaces into one.
 EFILES = $(foreach i,$(EDIRS),$(subst $(empty) , $(i)/, $(EFILES_$(i):  = )))
 
-BCFLAGS=-emit-llvm -c
-
 include_e:
 	- at echo "Building $(OBJPATH)/include_e ..."
 	-$(HIDE) rm -rf $(OBJPATH)/include_e opt_*
@@ -156,7 +154,7 @@
 
 #Generate the actual bytecode to be used
 ../ip_fw_rules.bc:
-	@$(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.c
+	$(HIDE) $(CC) $(CFLAGS) -emit-llvm -c -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.c
 
 radix.o:#	CFLAGS += -U_KERNEL
 
@@ -165,10 +163,11 @@
 
 $(MOD): $(IPFW_OBJS) jit.o
 	$(MSG) "   LD $@"
-	$(HIDE)clang++ -o $@ $^ $(LIBS)
+	$(HIDE) clang++ -Wl,--start-group $(LIBS) $^ -Wl,--end-group -o $@
 
 jit.o: jit.cc ../ip_fw_rules.bc
-	clang++ -v -g -S $(J_CFLAGS) `llvm-config-devel --cxxflags` -o ./jit.o ../sys/netpfil/ipfw/jit.cc
+	$(MSG) "   CC $<"
+	$(HIDE)@clang++ -g -c $(J_CFLAGS) `llvm-config-devel --cxxflags` -o ./jit.o ../sys/netpfil/ipfw/jit.cc
 clean:
 	-rm -f *.o $(DN) $(MOD)
 	-rm -rf include_e


More information about the svn-soc-all mailing list