[med-svn] [subread] 01/02: d/patches: remove getopt.patch as it was solving the problem only partially. d/patches/arch_specific_flags.patch renamed gcc_flags_cleanup.patch use less variables for additional flags injection d/rules: use -fsigned-char gcc option for architectures where char is unsigned by default

Alex Mestiashvili malex-guest at moszumanska.debian.org
Wed May 20 20:02:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

malex-guest pushed a commit to branch master
in repository subread.

commit 1b4ecc1458f09cb08abb4a45320720a16a7f44bf
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Wed May 20 21:41:22 2015 +0200

    d/patches: remove getopt.patch as it was solving the problem only
     partially.
    d/patches/arch_specific_flags.patch renamed gcc_flags_cleanup.patch
     use less variables for additional flags injection
    d/rules: use -fsigned-char gcc option for architectures where char
     is unsigned by default
---
 ...ags_cleanup.patch => arch_specific_flags.patch} | 14 +++++----
 debian/patches/getopt.patch                        | 36 ----------------------
 debian/patches/series                              |  3 +-
 debian/rules                                       | 11 +++----
 4 files changed, 13 insertions(+), 51 deletions(-)

diff --git a/debian/patches/gcc_flags_cleanup.patch b/debian/patches/arch_specific_flags.patch
similarity index 59%
rename from debian/patches/gcc_flags_cleanup.patch
rename to debian/patches/arch_specific_flags.patch
index 100ace3..bb06253 100644
--- a/debian/patches/gcc_flags_cleanup.patch
+++ b/debian/patches/arch_specific_flags.patch
@@ -1,6 +1,8 @@
-Description: remove too specific -mtune and -msse* flags and inject hardening 
- flags, add -msse3 flag for i386/AMD64
-Origin: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Description: inject architecture specific flags:
+ for amd64 and i386 add -mtune=generic and -msse3,
+ for architectures where char is by default unsigned 
+ use -fsigned-char gcc option
+Author: Alex Mestiashvili <alex at biotec.tu-dresden.de>
 --- subread.orig/src/Makefile.Linux
 +++ subread/src/Makefile.Linux
 @@ -2,10 +2,10 @@
@@ -8,12 +10,12 @@ Origin: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
  include makefile.version
  
 -CCFLAGS = -mtune=core2 ${MACOS} -O9 -Wall  -DMAKE_FOR_EXON  -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\"  -D_FILE_OFFSET_BITS=64
-+CCFLAGS = ${MTUNE} -O9 -Wall  -DMAKE_FOR_EXON  -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\"  -D_FILE_OFFSET_BITS=64
++CCFLAGS = ${EXTRA_CC_FLAGS} -O9 -Wall  -DMAKE_FOR_EXON  -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\"  -D_FILE_OFFSET_BITS=64
  #CCFLAGS =  -D_FORTIFY_SOURCE=2 -mtune=core2 ${MACOS} -O2 -Wall  -DMAKE_FOR_EXON  -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\"  # -DREPORT_ALL_THE_BEST
 -LDFLAGS = ${STATIC_MAKE} -lpthread -lz -lm ${MACOS} -O9 -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
 -CC = gcc ${CCFLAGS} -ggdb -fomit-frame-pointer -ffast-math -funroll-loops -mmmx -msse -msse2 -msse3 -fmessage-length=0 
-+LDFLAGS = ${STATIC_MAKE} ${EXTRA_FLAGS} -lpthread -lz -lm -O9 -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
-+CC = gcc ${CCFLAGS} ${SSE_FLAGS} -ggdb -fomit-frame-pointer -ffast-math -funroll-loops -fmessage-length=0
++LDFLAGS = ${STATIC_MAKE} ${EXTRA_LD_FLAGS} -lpthread -lz -lm -O9 -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
++CC = gcc ${CCFLAGS} -ggdb -fomit-frame-pointer -ffast-math -funroll-loops -fmessage-length=0
  
  
  ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge long-hashtable
diff --git a/debian/patches/getopt.patch b/debian/patches/getopt.patch
deleted file mode 100644
index 68fdf45..0000000
--- a/debian/patches/getopt.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Description: getopt_long returns int
-Origin: Bug#784929
---- subread.orig/src/SNPCalling.c
-+++ subread/src/SNPCalling.c
-@@ -1524,7 +1524,7 @@
- 	for(xk1=0;xk1<1;xk1++){
- 
- 
--	char c;
-+	int c;
- 	char in_SAM_file[5000];
- 	char out_BED_file[300];
- 	char temp_path[300];
---- subread.orig/src/removeDupReads.c
-+++ subread/src/removeDupReads.c
-@@ -231,7 +231,7 @@
- int main_repeated_test(int argc,char ** argv)
- #endif
- {
--	char c;
-+	int c;
- 	char input_SAM_file[300];
- 	char output_SAM_file[300];
- 	char temp_path[300];
---- subread.orig/src/index-builder.c
-+++ subread/src/index-builder.c
-@@ -977,7 +977,8 @@
- {
- 	int threshold = 24, optindex=0;
- 	int memory_limit;	// 8000 MBytes
--	char output_file[300], c, tmp_fa_file[300], log_file_name[300];
-+	int c;
-+	char output_file[300], tmp_fa_file[300], log_file_name[300];
- 	char *ptr_tmp_fa_file[1];
- 	unsigned int * chromosome_lengths;
- 
diff --git a/debian/patches/series b/debian/patches/series
index 6c1fbc2..ddbd912 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
-getopt.patch
-gcc_flags_cleanup.patch
+arch_specific_flags.patch
 fix_syntax.patch
diff --git a/debian/rules b/debian/rules
index 55276a5..0f8ca33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,21 +4,18 @@ DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-export EXTRA_FLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+export EXTRA_LD_FLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 pkg := $(shell dpkg-parsechangelog --show-field=Source)
 mandir := $(CURDIR)/debian/$(pkg)/usr/share/man/man1
 bindir := $(CURDIR)/bin
 utildir := $(CURDIR)/bin/utilities
 
-SSE_FLAGS =
-MTUNE =
 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64 i386))
-SSE_FLAGS = -msse3 
-MTUNE = -mtune=generic
+        export EXTRA_CC_FLAGS = -msse3 -mtune=generic
+else ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),arm64 armel armhf mips powerpc ppc64el s390x))
+        export EXTRA_CC_FLAGS = -fsigned-char
 endif
-export SSE_FLAGS
-export MTUNE
 
 %:
 	dh $@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/subread.git



More information about the debian-med-commit mailing list