Commit 0b5b9f90 authored by Theodore Ts'o's avatar Theodore Ts'o
Browse files

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: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 1d9b8183
......@@ -752,7 +752,6 @@ MAINTAINER_CMT
LINUX_INCLUDE
EGREP
GREP
LD
CPP
OBJEXT
EXEEXT
......@@ -823,7 +822,6 @@ ac_user_opts='
enable_option_checking
with_diet_libc
with_cc
with_linker
with_ccopts
with_ldopts
with_root_prefix
......@@ -1514,10 +1512,9 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-diet-libc use diet libc
--with-cc=COMPILER select compiler to use
--with-linker=LINKER select linker to use
--with-ccopts=CCOPTS select compiler command line options
--with-ldopts=LDOPTS select linker command line options
--with-cc no longer supported, use CC= instead
--with-ccopts no longer supported, use CFLAGS= instead
--with-ldopts no longer supported, use LDFLAGS= instead
--with-root-prefix=PREFIX override prefix variable for files to be placed in the root
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
......@@ -2163,15 +2160,26 @@ fi
# Check whether --with-cc was given.
if test "${with_cc+set}" = set; then
withval=$with_cc; { $as_echo "$as_me:$LINENO: result: CC=$withval" >&5
$as_echo "CC=$withval" >&6; }
CC=$withval
else
if test -z "$CC" ; then CC=cc; fi
{ $as_echo "$as_me:$LINENO: result: CC defaults to $CC" >&5
$as_echo "CC defaults to $CC" >&6; }
withval=$with_cc; { { $as_echo "$as_me:$LINENO: error: --with-cc no longer supported; use CC= instead" >&5
$as_echo "$as_me: error: --with-cc no longer supported; use CC= instead" >&2;}
{ (exit 1); exit 1; }; }
fi
# Check whether --with-ccopts was given.
if test "${with_ccopts+set}" = set; then
withval=$with_ccopts; { { $as_echo "$as_me:$LINENO: error: --with-ccopts no longer supported; use CFLAGS= instead" >&5
$as_echo "$as_me: error: --with-ccopts no longer supported; use CFLAGS= instead" >&2;}
{ (exit 1); exit 1; }; }
fi
# Check whether --with-ldopts was given.
if test "${with_ldopts+set}" = set; then
withval=$with_ldopts; { { $as_echo "$as_me:$LINENO: error: --with-ldopts no longer supported; use LDFLAGS= instead" >&5
$as_echo "$as_me: error: --with-ldopts no longer supported; use LDFLAGS= instead" >&2;}
{ (exit 1); exit 1; }; }
fi
export CC
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
......@@ -3343,26 +3351,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check whether --with-linker was given.
if test "${with_linker+set}" = set; then
withval=$with_linker; { $as_echo "$as_me:$LINENO: result: LD=$withval" >&5
$as_echo "LD=$withval" >&6; }
LD=$withval
else
if test -z "$LD" ; then LD=$CC; fi
{ $as_echo "$as_me:$LINENO: result: LD defaults to $LD" >&5
$as_echo "LD defaults to $LD" >&6; }
fi
export LD
# Check whether --with-ccopts was given.
if test "${with_ccopts+set}" = set; then
withval=$with_ccopts; { $as_echo "$as_me:$LINENO: result: CCOPTS is $withval" >&5
$as_echo "CCOPTS is $withval" >&6; }
CFLAGS=$withval
fi
{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
......@@ -3908,14 +3896,6 @@ LIB_EXT=.a
STATIC_LIB_EXT=.a
PROFILED_LIB_EXT=.a
# Check whether --with-ldopts was given.
if test "${with_ldopts+set}" = set; then
withval=$with_ldopts; { $as_echo "$as_me:$LINENO: result: LDFLAGS is $withval" >&5
$as_echo "LDFLAGS is $withval" >&6; }
LDFLAGS=$withval
fi
# Check whether --with-root-prefix was given.
if test "${with_root_prefix+set}" = set; then
withval=$with_root_prefix; root_prefix=$withval
......
......@@ -72,37 +72,20 @@ CC="diet cc -nostdinc"
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
AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
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])
AC_ARG_WITH([ccopts],
AC_HELP_STRING([--with-ccopts],[no longer supported, use CFLAGS= instead]),
AC_MSG_ERROR([--with-ccopts no longer supported; use CFLAGS= instead]))
dnl
dnl set $(CCOPTS) from --with-ccopts=value
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_ARG_WITH([ccopts],
[ --with-ccopts=CCOPTS select compiler command line options],
AC_MSG_RESULT(CCOPTS is $withval)
CFLAGS=$withval,
)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 @@ LIB_EXT=.a
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],
......
......@@ -105,22 +105,17 @@ BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
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 @@ else
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 @@ else
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 @@ ${CFGSTDSTAMP}:
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 @@ ${CFGBFSTAMP}:
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 @@ ${CFGSTATICSTAMP}:
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 @@ ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment