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

Bug#270635: apache: building process should respect CFLAGS and LDFLAGS



Package: apache
Version: 1.3.31-5
Severity: minor
Tags: patch

there is no simple way to build packeage with additional options for
compilation and linking.
Buildiing process should respect enviroment variables CFLAGS and LDFLAGS
to allow optimization or security improvments by seting up compilator
switches.
For egsample smb may want to use -march/-mcpu to optimize for specific
platform, or -Wl,-pie to make position independent executables.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
--- rules.orig	2004-09-08 14:03:36.000000000 +0200
+++ rules	2004-09-08 14:05:56.000000000 +0200
@@ -129,7 +129,7 @@
 $(STAMP_DIR)/configure-stamp-apache: $(STAMP_DIR)/source.make
 	@echo -e "\n\n*** Configuring apache ***\n\n"
 
-	cd $(V) && CFLAGS="$(CONFLAGS)" ./configure $(APACHEARGS)
+	cd $(V) && LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS) $(CONFLAGS)" ./configure $(APACHEARGS)
 
 	@echo -e "\n\n*** Creating apaci (apache) *** \n\n"
 
@@ -169,7 +169,7 @@
 $(STAMP_DIR)/configure-stamp-ssl: $(STAMP_DIR)/source.make
 	@echo -e "\n\n*** Configuring apache-ssl ***\n\n"
 
-	cd $(S) && CFLAGS="$(CONFLAGS)" ./configure $(SSLARGS)
+	cd $(S) && LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS) $(CONFLAGS)" ./configure $(SSLARGS)
 
 	@echo -e "\n\n*** Creating apaci (apache-ssl) *** \n\n"
 
@@ -218,7 +218,7 @@
 		PERL_TRACE=0 PERL_LOG_API=1 PERL_URI_API=1 PERL_UTIL_API=1 \
 		PERL_TABLE_API=1 PERL_FILE_API=1
 
-	cd $(P) && CFLAGS="$(CONFLAGS)" ./configure $(PERLARGS)
+	cd $(P) && LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS) $(CONFLAGS)" ./configure $(PERLARGS)
 
 	@echo -e "\n\n*** Creating apaci (apache-perl) *** \n\n"
 

Reply to: