configure.in, configure: Drop --with-cc, --with-ccopts, --with-ldopts
Remove the configure options --with-cc, --with-ccopts, --with-ldopts,
and --with-ld (which never worked), since the first three can be
replaced with CC=, CCFLAGS=, and LDFLAGS= on the configure
command-line. The default for --with-cc caused the CC= to be
overridden even with it was specified to the configure script.
Addresses-Sourceforge-Bug: #2843248
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/configure b/configure
index f2729e5..10ee09f 100755
--- a/configure
+++ b/configure
Binary files differ
diff --git a/configure.in b/configure.in
index acbcec6..c38f0a8 100644
--- a/configure.in
+++ b/configure.in
@@ -72,37 +72,20 @@
WITH_DIET_LIBC=yes
AC_MSG_RESULT(CC=$CC))dnl
dnl
-dnl set $(CC) from --with-cc=value
-dnl
AC_ARG_WITH([cc],
-[ --with-cc=COMPILER select compiler to use],
-AC_MSG_RESULT(CC=$withval)
-CC=$withval,
-if test -z "$CC" ; then CC=cc; fi
-[AC_MSG_RESULT(CC defaults to $CC)])dnl
-export CC
-AC_SUBST([CC])
-AC_PROG_CC
-AC_PROG_CPP
-dnl
-dnl set $(LD) from --with-linker=value
-dnl
-AC_ARG_WITH([linker],
-[ --with-linker=LINKER select linker to use],
-AC_MSG_RESULT(LD=$withval)
-LD=$withval,
-if test -z "$LD" ; then LD=$CC; fi
-[AC_MSG_RESULT(LD defaults to $LD)])dnl
-export LD
-AC_SUBST([LD])
-dnl
-dnl set $(CCOPTS) from --with-ccopts=value
+AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
+AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
dnl
AC_ARG_WITH([ccopts],
-[ --with-ccopts=CCOPTS select compiler command line options],
-AC_MSG_RESULT(CCOPTS is $withval)
-CFLAGS=$withval,
-)dnl
+AC_HELP_STRING([--with-ccopts],[no longer supported, use CFLAGS= instead]),
+AC_MSG_ERROR([--with-ccopts no longer supported; use CFLAGS= instead]))
+dnl
+AC_ARG_WITH([ldopts],
+AC_HELP_STRING([--with-ldopts],[no longer supported, use LDFLAGS= instead]),
+AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
+dnl
+AC_PROG_CC
+AC_PROG_CPP
dnl
dnl On systems without linux header files, we add an extra include directory
dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
@@ -138,15 +121,6 @@
STATIC_LIB_EXT=.a
PROFILED_LIB_EXT=.a
dnl
-dnl set $(LDFLAGS) from --with-ldopts=value
-dnl
-AC_ARG_WITH([ldopts],
-[ --with-ldopts=LDOPTS select linker command line options],
-AC_MSG_RESULT(LDFLAGS is $withval)
-LDFLAGS=$withval,
-)dnl
-AC_SUBST(LDFLAGS)
-dnl
dnl Allow separate `root_prefix' to be specified
dnl
AC_ARG_WITH([root-prefix],
diff --git a/debian/rules b/debian/rules
index b4fa513..f62e86f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -105,22 +105,17 @@
BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
BUILDSTATICSTAMP=${STAMPSDIR}/build-static-stamp
-CCOPTS = -g
-
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 0755
-ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-CCOPTS += -O2
-endif
#ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
#INSTALL_PROGRAM += -s
#endif
ifeq (${DEB_HOST_ARCH},alpha)
-CCOPTS += -DHAVE_NETINET_IN_H
+CFLAGS += -DHAVE_NETINET_IN_H
else
-CCOPTS += -D__NO_STRING_INLINES
+CFLAGS += -D__NO_STRING_INLINES
endif
ifeq (${DEB_HOST_ARCH_OS},linux)
@@ -130,7 +125,7 @@
E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
endif
-BF_CCOPTS = -Os -fomit-frame-pointer
+BF_CFLAGS = -Os -fomit-frame-pointer
COMMON_CONF_FLAGS = \
--enable-elf-shlibs --infodir=/usr/share/info
@@ -141,21 +136,17 @@
COMMON_CONF_FLAGS += --enable-fsck
endif
-STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression
+STD_CONF_FLAGS = --enable-compression
-BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
- --disable-nls --disable-imager --disable-testio-debug \
+BF_CONF_FLAGS = --disable-nls --disable-imager --disable-testio-debug \
--disable-uuidd --disable-tls \
--disable-debugfs --disable-e2initrd-helper
-STATIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
- --disable-nls --disable-imager \
+STATIC_CONF_FLAGS = --disable-nls --disable-imager \
--disable-uuidd --disable-tls \
- --disable-e2initrd-helper \
- --with-ccopts=-fno-stack-protector
+ --disable-e2initrd-helper
-MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
- --disable-nls --disable-imager \
+MIPS_NOPIC_CONF_FLAGS = --disable-nls --disable-imager \
--disable-uuidd --disable-tls \
--disable-resizer # --disable-debugfs
@@ -188,20 +179,22 @@
mkdir -p ${stdbuilddir}
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
cd ${stdbuilddir} && AWK=/usr/bin/awk \
- ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS}
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
+ CFLAGS="${CFLAGS}"
else
cd ${stdbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
- --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+ CFLAGS="${CFLAGS}"
endif
# specially-built MIPS libs
ifneq ($(ismips),)
mkdir -p ${mipsbuilddir} ${mipsbuilddir64}
cd ${mipsbuilddir} && AWK=/usr/bin/awk \
- ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS}
+ ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} CFLAGS="${CFLAGS}"
cd ${mipsbuilddir64} && AWK=/usr/bin/awk \
- ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS}
+ ${topdir}/configure ${MIPS_NOPIC_CONF_FLAGS} CFLAGS="${CFLAGS}"
endif
mkdir -p ${STAMPSDIR}
@@ -214,11 +207,13 @@
mkdir -p ${bfbuilddir}
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
cd ${bfbuilddir} && AWK=/usr/bin/awk \
- ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS}
+ ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
+ CFLAGS="${CFLAGS} ${BF_CFLAGS}"
else
cd ${bfbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
- --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+ CFLAGS="${CFLAGS}"
endif
mkdir -p ${STAMPSDIR}
touch ${CFGBFSTAMP}
@@ -231,16 +226,18 @@
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
if type diet > /dev/null 2>&1 ; then \
cd ${staticbuilddir} && AWK=/usr/bin/awk \
- ${topdir}/configure ${STATIC_CONF_FLAGS} \
- --with-diet-libc; \
+ ${topdir}/configure ${STATIC_CONF_FLAGS} \
+ --with-diet-libc CFLAGS="${CFLAGS} -fno-stack-protector"; \
else \
cd ${staticbuilddir} && AWK=/usr/bin/awk \
- ${topdir}/configure ${STATIC_CONF_FLAGS}; \
+ ${topdir}/configure ${STATIC_CONF_FLAGS} \
+ CFLAGS="${CFLAGS} -fno-stack-protector"; \
fi
else
cd ${staticbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} \
- --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+ CFLAGS="${CFLAGS} -fno-stack-protector"
endif
mkdir -p ${STAMPSDIR}
touch ${CFGSTATICSTAMP}
@@ -262,11 +259,11 @@
ifneq ($(ismips),)
$(MAKE) -C ${mipsbuilddir}/util
$(MAKE) -C ${mipsbuilddir} \
- CFLAGS="${CCOPTS} ${MIPS_CFLAGS}" \
+ CFLAGS="${CFLAGS} ${MIPS_CFLAGS}" \
LIB_SUBDIRS="lib/et lib/ext2fs" libs
$(MAKE) -C ${mipsbuilddir64}/util
$(MAKE) -C ${mipsbuilddir64} \
- CFLAGS="${CCOPTS} ${MIPS_CFLAGS_64}" \
+ CFLAGS="${CFLAGS} ${MIPS_CFLAGS_64}" \
LIB_SUBDIRS="lib/et lib/ext2fs" libs
endif