Source: scalpel Version: 1.60-9 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
scalpel fails to cross build from source, because the upstream Makefile combines CFLAGS into CC. When dh_auto_build overrides CC, the CFLAGS (including -fcommon) get lost and scalpel fails to build. Please consider applying the attached patch to separate them and make scalpel cross buildable. Helmut
--- scalpel-1.60.orig/Makefile +++ scalpel-1.60/Makefile @@ -2,9 +2,8 @@ CC_OPTS = $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) GOAL = scalpel -CC += $(CC_OPTS) .c.o: - $(CC) -c $< + $(CC) $(CC_OPTS) -c $< HEADER_FILES = scalpel.h prioque.h dirname.h SRC = helpers.c files.c scalpel.c dig.c prioque.c base_name.c @@ -12,18 +11,18 @@ all: linux -linux: CC += -D__LINUX +linux: CC_OPTS += -D__LINUX linux: $(GOAL) -bsd: CC += -D__OPENBSD +bsd: CC_OPTS += -D__OPENBSD bsd: $(GOAL) -win32: CC += -D__WIN32 -Ic:\PThreads\include +win32: CC_OPTS += -D__WIN32 -Ic:\PThreads\include win32: $(SRC) $(HEADER_FILES) - $(CC) -o $(GOAL).exe $(SRC) -liberty -Lc:\PThreads\lib -lpthreadGC1 + $(CC) $(CC_OPTS) -o $(GOAL).exe $(SRC) -liberty -Lc:\PThreads\lib -lpthreadGC1 $(GOAL): $(OBJS) - $(CC) -o $(GOAL) $(OBJS) -lm + $(CC) $(CC_OPTS) -o $(GOAL) $(OBJS) -lm scalpel.o: scalpel.c $(HEADER_FILES) Makefile dig.o: dig.c $(HEADER_FILES) Makefile