def patch(self, arch, opt, debug, proto): bits = util.bits_for_arch(arch) diff = """diff -ruN pfscan_ref/pfscan-1.0/Makefile pfscan_proto/pfscan-1.0/Makefile --- pfscan_ref/pfscan-1.0/Makefile 2012-10-25 22:41:35.113016000 -0400 +++ pfscan_proto/pfscan-1.0/Makefile 2012-10-09 22:56:21.039637483 -0400 @@ -23,9 +23,9 @@ SOL_LIBS= -lpthread -lnsl -lsocket ## Linux 2.4 with Gcc 2.96 -LNX_CC=gcc -Wall -g -O -LNX_LDOPTS=-Wl,-s -LNX_LIBS=-lpthread -lnsl +LNX_CC=gcc -Wall -O%d -m%d%s%s +LNX_LDOPTS=-m%d%s +LNX_LIBS=%s OBJS = pfscan.o bm.o version.o pqueue.o """ % ( opt, bits, " -g" if debug else "", " -lpthread" if not proto else "", bits, " -Wl,-s" if not proto else "", "-rdynamic ${PROTO_LIB_DIR}/libproto.so -dl" if proto else "-lpthread -lnsl", ) return diff.encode("ascii")
def patch(self, arch, opt, debug, proto): bits = util.bits_for_arch(arch) diff = """diff -ruN pbzip2_x86_ref/pbzip2-1.1.6/Makefile pbzip2_x86_proto/pbzip2-1.1.6/Makefile --- pbzip2_x86_ref/pbzip2-1.1.6/Makefile 2011-10-30 15:22:47.000000000 -0400 +++ pbzip2_x86_proto/pbzip2-1.1.6/Makefile 2012-10-29 22:49:36.881509837 -0400 @@ -3,7 +3,7 @@ # Compiler to use CC = g++ -CFLAGS = -O2 +CFLAGS = -O%d%s #CFLAGS += -g -Wall #CFLAGS += -ansi #CFLAGS += -pedantic @@ -34,11 +34,11 @@ #CFLAGS += -DIGNORE_TRAILING_GARBAGE=1 # On some compilers -pthreads -CFLAGS += -pthread +CFLAGS += -m%d%s # External libraries LDFLAGS = -lbz2 -LDFLAGS += -lpthread +LDFLAGS += -m%d%s # Where you want pbzip2 installed when you do 'make install' PREFIX = /usr """ % (opt, ' -g' if debug else '', bits, ' -pthread' if not proto else '', bits, ' -pthread' if not proto else ' -rdynamic ${PROTO_LIB_DIR}/libproto.so -dl') return diff.encode('ascii')
def patch(self, arch, opt, debug, proto): bits = util.bits_for_arch(arch) diff = """--- phoenix_x86_opt0_ref/phoenix-2.0.0/Defines.mk 2009-05-27 23:00:58.000000000 -0400 +++ phoenix_x86_opt0_proto/phoenix-2.0.0/Defines.mk 2012-10-30 10:26:13.083875191 -0400 @@ -38,8 +38,8 @@ OS = -D_LINUX_ CC = gcc #DEBUG = -g -CFLAGS = -Wall $(OS) $(DEBUG) -O3 -LIBS = -lpthread +CFLAGS = -Wall $(OS) $(DEBUG) -O%d%s -m%d +LIBS = %s -m%d endif ifeq ($(OSTYPE),SunOS)""" % ( opt, ' -g' if debug else '', bits, '-rdynamic ${PROTO_LIB_DIR}/libproto.so -dl' if proto else '-lpthread', bits) return diff.encode('ascii')
def patch(self, arch, opt, debug, proto): bits = util.bits_for_arch(arch) diff = """diff -ruN pfscan_ref/pfscan-1.0/Makefile pfscan_proto/pfscan-1.0/Makefile --- pfscan_ref/pfscan-1.0/Makefile 2012-10-25 22:41:35.113016000 -0400 +++ pfscan_proto/pfscan-1.0/Makefile 2012-10-09 22:56:21.039637483 -0400 @@ -23,9 +23,9 @@ SOL_LIBS= -lpthread -lnsl -lsocket ## Linux 2.4 with Gcc 2.96 -LNX_CC=gcc -Wall -g -O -LNX_LDOPTS=-Wl,-s -LNX_LIBS=-lpthread -lnsl +LNX_CC=gcc -Wall -O%d -m%d%s%s +LNX_LDOPTS=-m%d%s +LNX_LIBS=%s OBJS = pfscan.o bm.o version.o pqueue.o """ % (opt, bits, ' -g' if debug else '', ' -lpthread' if not proto else '', bits, ' -Wl,-s' if not proto else '', '-rdynamic ${PROTO_LIB_DIR}/libproto.so -dl' if proto else '-lpthread -lnsl') return diff.encode('ascii')