Skip to content

Commit

Permalink
Remove -fPIC for example and test builds (#95)
Browse files Browse the repository at this point in the history
* Remove -fPIC for example and test builds
  • Loading branch information
wolkykim authored Nov 4, 2022
1 parent ae07274 commit def7cce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
13 changes: 4 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ MKDIR_P
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
CFLAGS_LIB
OBJEXT
EXEEXT
ac_ct_CC
Expand Down Expand Up @@ -3131,9 +3132,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test $ac_compiler_gnu = yes; then
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -fPIC"
#else
# AC_MSG_FAILURE([GCC is required.])
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
CFLAGS_LIB="$CFLAGS -fPIC"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
Expand Down Expand Up @@ -4742,12 +4743,6 @@ $as_echo "$as_me: 'ext-qdatabase' feature is disabled" >&6;}
fi
if test "$enableval" = yes; then
CFLAGS="$CFLAGS -g -O2"
else
CFLAGS="$CFLAGS -g -O2"
fi
##
## --with section
##
Expand Down
12 changes: 3 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ AC_PREFIX_DEFAULT([/usr/local])
## Checks for programs.
AC_PROG_CC
if test $ac_compiler_gnu = yes; then
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -fPIC"
#else
# AC_MSG_FAILURE([GCC is required.])
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
CFLAGS_LIB="$CFLAGS -fPIC"
AC_SUBST(CFLAGS_LIB)
fi
AC_PROG_CC_C99
if test $ac_cv_prog_cc_c99 = no; then
Expand Down Expand Up @@ -164,12 +164,6 @@ Q_ARG_DISABLE([ext-qlog], [Disable qlog extension in qlibext library.], [-DDISAB
Q_ARG_DISABLE([ext-qhttpclient], [Disable qhttpclient extension in qlibext library.], [-DDISABLE_QHTTPCLIENT])
Q_ARG_DISABLE([ext-qdatabase], [Disable qdatabase extension in qlibext library.], [-DDISABLE_QDATABASE])

if test "$enableval" = yes; then
CFLAGS="$CFLAGS -g -O2"
else
CFLAGS="$CFLAGS -g -O2"
fi

##
## --with section
##
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ QLIBCEXT_OBJS = \

## Which compiler & options for release
CC = @CC@
CFLAGS = @CFLAGS@
CFLAGS = @CFLAGS_LIB@
CPPFLAGS = @CPPFLAGS@ -I${QLIBC_INCDIR} -I./internal

## Make Library
Expand Down
4 changes: 1 addition & 3 deletions tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CPPFLAGS = @CPPFLAGS@ -I${QLIBC_INCDIR}
RM = @RM@
DEPLIBS = @DEPLIBS@

TARGETS1 = \
TARGETS = \
test_qstring \
test_qhashtbl \
test_qhasharr \
Expand All @@ -52,8 +52,6 @@ TARGETS1 = \
test_qstack \
test_qhash

TARGETS2 = ${TARGETS1}
TARGETS = ${@EXAMPLES_TARGETS@}
LIBQLIBC = ${QLIBC_LIBDIR}/libqlibc.a ${DEPLIBS}
LIBQLIBCEXT = ${QLIBC_LIBDIR}/libqlibcext.a

Expand Down

0 comments on commit def7cce

Please sign in to comment.