[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

downgrading optimization for m68k [was: Bug#328453: pbzip2_0.9.4-1(m68k/unstable/zeus): FTBFS on m68k]

On Thu, Sep 15, 2005 at 07:22:25AM -0500, Stephen R Marenka wrote:
>Package: pbzip2
>Version: 0.9.4-1
>Severity: serious
>Justification: fails to build on release candidate arch.
>Tags: sid
>pbzip2 fails to build from source on m68k. This is likely due
>to bug #317475 on gcc-4.0. As a workaround, you might try compiling with
>less optimization or gcc-3.3/gcc-3.4.

It would be nice if the optimization downgrade is done _only_ for
m68k as I did it for pbzip2 with the attached patch.

>A full buildd log is available at 
>Other buildd logs may be available at 
>Stephen R. Marenka     If life's not fun, you're not doing it right!

Anibal Monsalve Salazar
 .''`. Debian GNU/Linux
: :' : Free Operating System
`. `'  http://debian.org/
  `-   http://v7w.com/anibal
debdiff cache/pbzip2/pbzip2_0.9.4-1.dsc cache/pbzip2/pbzip2_0.9.4-2.dsc
diff -u pbzip2-0.9.4/debian/changelog pbzip2-0.9.4/debian/changelog
--- pbzip2-0.9.4/debian/changelog
+++ pbzip2-0.9.4/debian/changelog
@@ -1,3 +1,9 @@
+pbzip2 (0.9.4-2) unstable; urgency=low
+  * debian/rules: no optimizacion for m68k, closes: #328453.
+ -- Anibal Monsalve Salazar <anibal@debian.org>  Thu, 15 Sep 2005 23:38:32 +1000
 pbzip2 (0.9.4-1) unstable; urgency=low
   * New upstream release, closes: #325794.
diff -u pbzip2-0.9.4/debian/rules pbzip2-0.9.4/debian/rules
--- pbzip2-0.9.4/debian/rules
+++ pbzip2-0.9.4/debian/rules
@@ -10,7 +10,8 @@
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
-CFLAGS = -Wall -g
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+CFLAGS = -Wall
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
@@ -18,6 +19,10 @@
 	CFLAGS += -O2
+ifneq (,$(findstring m68k,$(DEB_HOST_ARCH)))
+	CFLAGS = -Wall -O0
 configure: configure-stamp
@@ -31,7 +36,7 @@
 	# Add here commands to compile the package.
-	$(MAKE)
 	touch build-stamp
only in patch2:
--- pbzip2-0.9.4.orig/Makefile
+++ pbzip2-0.9.4/Makefile
@@ -11,16 +11,16 @@
 # Standard pbzip2 compile
 pbzip2: pbzip2.cpp
-	$(CC) -O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.cpp -pthread -lpthread -lbz2
+	$(CC) $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.cpp -pthread -lpthread -lbz2
 # Choose this if you want to compile in a static version of the libbz2 library
 pbzip2-static: libbz2.a pbzip2.cpp
-	$(CC) -O3 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.cpp -pthread -lpthread -I. -L. -lbz2
+	$(CC) $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o pbzip2 pbzip2.cpp -pthread -lpthread -I. -L. -lbz2
 # Compatability mode for 32bit file sizes (less than 2GB) and systems
 # that have compilers that treat int as 64bit natively (ie: modern AIX)
 pbzip2-compat: pbzip2.cpp
-	$(CC) -O3 -o pbzip2 pbzip2.cpp -pthread -lpthread -lbz2
+	$(CC) $(CFLAGS) -o pbzip2 pbzip2.cpp -pthread -lpthread -lbz2
 # Install the binary pbzip2 program and man page
 install: pbzip2

Attachment: signature.asc
Description: Digital signature

Reply to: