[GHC] #8683: add "cpp program" and "cpp program options" to settings file

GHC ghc-devs at haskell.org
Fri Jan 24 18:34:02 UTC 2014


#8683: add "cpp program" and "cpp program options" to settings file
-------------------------------------+------------------------------------
        Reporter:  carter            |            Owner:
            Type:  feature request   |           Status:  patch
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #8439
-------------------------------------+------------------------------------

Comment (by carter):

 here an error from
 ./configure --with-gcc=clang --with-cpp=gcc

 (where i try to add the cpp flags to mk/config.in with a patch i've not
 pushed yet)

 {{{
 Writing new package config file... done.
 "inplace/bin/ghc-cabal" configure libraries/terminfo dist-boot "" --with-
 ghc="/usr/bin/ghc" --with-ghc-pkg="/usr/bin/ghc-pkg"  --package-
 db=/Users/carter/Desktop/repoScratcher/ghc/libraries/bootstrapping.conf
 --disable-library-for-ghci --enable-library-vanilla --disable-library-
 profiling --disable-shared --with-
 hscolour="/Users/carter/Library/Haskell/bin/HsColour" --configure-
 option=CFLAGS=" -m64 -fno-stack-protector   " --configure-option=LDFLAGS="
 -m64  " --configure-option=CPPFLAGS=" -m64 -E -undef -traditional   "
 --constraint "Cabal == 1.18.1.3"   --constraint "hpc == 0.6.0.1"
 --constraint "bin-package-db == 0.0.0.0"   --constraint "hoopl ==
 3.10.0.0"   --constraint "transformers == 0.3.0.0"   --constraint
 "terminfo == 0.4.0.0" --with-gcc="gcc" --configure-option=--with-cc="gcc"
 --with-ar="/usr/bin/ar" --with-ranlib="ranlib" --with-
 alex="/Users/carter/Library/Haskell/bin/alex" --with-
 happy="/Users/carter/Library/Haskell/bin/happy"
 Configuring terminfo-0.4.0.0...
 configure: WARNING: unrecognized options: --with-compiler, --with-gcc
 checking for gcc... gcc
 checking whether the C compiler works... no
 configure: error: in
 `/Users/carter/Desktop/repoScratcher/ghc/libraries/terminfo':
 configure: error: C compiler cannot create executables
 See `config.log' for more details
 make[1]: *** [libraries/terminfo/dist-boot/package-data.mk] Error 77
 make: *** [all] Error 2
 }}}

 with the associated log  being

 {{{
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.

 It was created by Haskell terminfo package configure 0.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was

   $ ./configure --with-compiler=ghc CFLAGS= -m64 -fno-stack-protector
 LDFLAGS= -m64   CPPFLAGS= -m64 -E -undef -traditional    --with-cc=gcc
 --with-gcc=/Users/carter/bin/gcc

 ## --------- ##
 ## Platform. ##
 ## --------- ##

 hostname = Carters-MacBook-Air.local
 uname -m = x86_64
 uname -r = 13.0.0
 uname -s = Darwin
 uname -v = Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
 root:xnu-2422.1.72~6/RELEASE_X86_64

 /usr/bin/uname -p = i386
 /bin/uname -X     = unknown

 /bin/arch              = unknown
 /usr/bin/arch -k       = unknown
 /usr/convex/getsysinfo = unknown
 /usr/bin/hostinfo      = Mach kernel version:
          Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
 root:xnu-2422.1.72~6/RELEASE_X86_64
 Kernel configured for up to 4 processors.
 2 processors are physically available.
 4 processors are logically available.
 Processor type: i486 (Intel 80486)
 Processors active: 0 1 2 3
 Primary memory available: 4.00 gigabytes
 Default processor set: 183 tasks, 925 threads, 4 processors
 Load average: 1.99, Mach factor: 2.00
 /bin/machine           = unknown
 /usr/bin/oslevel       = unknown
 /bin/universe          = unknown

 PATH: /Users/carter/.opam/system/bin
 PATH: /opt/local/bin
 PATH: /Users/carter/bin
 PATH: /usr/local/Cellar/smlnj/110.74/libexec/bin
 PATH: /Applications/Postgres.app/Contents/MacOS/bin
 PATH: /Users/carter/.scripts
 PATH: /Users/carter/Library/Haskell/bin
 PATH: /Users/carter/docTemplates
 PATH: /usr/local/share/npm/bin
 PATH: /usr/local/share/python
 PATH: /usr/local/Cellar/ruby/1.9.3-p194/bin
 PATH: /usr/local/bin
 PATH: /usr/local/sbin
 PATH: /usr/local/cuda/bin
 PATH: /usr/bin
 PATH: /bin
 PATH: /usr/sbin
 PATH: /sbin
 PATH: /usr/local/bin
 PATH: /opt/X11/bin
 PATH: /usr/texbin
 PATH: /usr/texbin


 ## ----------- ##
 ## Core tests. ##
 ## ----------- ##

 configure:2117: checking for gcc
 configure:2144: result: gcc
 configure:2373: checking for C compiler version
 configure:2382: gcc --version >&5
 i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
 Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.

 configure:2393: $? = 0
 configure:2382: gcc -v >&5
 Using built-in specs.
 Target: i686-apple-darwin11
 Configured with: /Volumes/Media/Builds/gcc-5666.3/build/obj/src/configure
 --disable-checking --prefix=/usr --mandir=/share/man --enable-
 languages=c,objc,c++,obj-c++,fortran --program-transform-
 name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
 darwin11 --program-prefix=i686-apple-darwin11- --host=x86_64-apple-
 darwin11 --target=i686-apple-darwin11 --with-gxx-include-
 dir=/include/c++/4.2.1
 Thread model: posix
 gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
 configure:2393: $? = 0
 configure:2382: gcc -V >&5
 gcc-4.2: argument to `-V' is missing
 configure:2393: $? = 1
 configure:2382: gcc -qversion >&5
 i686-apple-darwin11-gcc-4.2.1: no input files
 configure:2393: $? = 1
 configure:2413: checking whether the C compiler works
 configure:2435: gcc  -m64 -fno-stack-protector     -m64 -E -undef
 -traditional     -m64   conftest.c  >&5
 # 1 "conftest.c"
 # 1 "<built-in>"
 # 1 "<command-line>"
 # 1 "conftest.c"









 int
 main ()
 {

   ;
   return 0;
 }
 configure:2439: $? = 0
 configure:2477: result: no
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "Haskell terminfo package"
 | #define PACKAGE_TARNAME "terminfo"
 | #define PACKAGE_VERSION "0.2"
 | #define PACKAGE_STRING "Haskell terminfo package 0.2"
 | #define PACKAGE_BUGREPORT "judah dot jacobson at gmail dot com"
 | #define PACKAGE_URL ""
 | /* end confdefs.h.  */
 |
 | int
 | main ()
 | {
 |
 |   ;
 |   return 0;
 | }
 configure:2482: error: in
 `/Users/carter/Desktop/repoScratcher/ghc/libraries/terminfo':
 configure:2484: error: C compiler cannot create executables
 See `config.log' for more details

 ## ---------------- ##
 ## Cache variables. ##
 ## ---------------- ##

 ac_cv_env_CC_set=
 ac_cv_env_CC_value=
 ac_cv_env_CFLAGS_set=set
 ac_cv_env_CFLAGS_value=' -m64 -fno-stack-protector   '
 ac_cv_env_CPPFLAGS_set=set
 ac_cv_env_CPPFLAGS_value=' -m64 -E -undef -traditional   '
 ac_cv_env_CPP_set=
 ac_cv_env_CPP_value=
 ac_cv_env_LDFLAGS_set=set
 ac_cv_env_LDFLAGS_value=' -m64  '
 ac_cv_env_LIBS_set=
 ac_cv_env_LIBS_value=
 ac_cv_env_build_alias_set=
 ac_cv_env_build_alias_value=
 ac_cv_env_host_alias_set=
 ac_cv_env_host_alias_value=
 ac_cv_env_target_alias_set=
 ac_cv_env_target_alias_value=
 ac_cv_prog_ac_ct_CC=gcc

 ## ----------------- ##
 ## Output variables. ##
 ## ----------------- ##

 CC='gcc'
 CFLAGS=' -m64 -fno-stack-protector   '
 CPP=''
 CPPFLAGS=' -m64 -E -undef -traditional   '
 DEFS=''
 ECHO_C='\c'
 ECHO_N=''
 ECHO_T=''
 EGREP=''
 EXEEXT=''
 GREP=''
 LDFLAGS=' -m64  '
 LIBOBJS=''
 LIBS=''
 LTLIBOBJS=''
 OBJEXT=''
 PACKAGE_BUGREPORT='judah dot jacobson at gmail dot com'
 PACKAGE_NAME='Haskell terminfo package'
 PACKAGE_STRING='Haskell terminfo package 0.2'
 PACKAGE_TARNAME='terminfo'
 PACKAGE_URL=''
 PACKAGE_VERSION='0.2'
 PATH_SEPARATOR=':'
 SHELL='/bin/sh'
 TERMINFO_INCLUDES=''
 TERMINFO_INCLUDE_DIRS=''
 TERMINFO_LIB=''
 TERMINFO_LIB_DIRS=''
 ac_ct_CC='gcc'
 bindir='${exec_prefix}/bin'
 build_alias=''
 datadir='${datarootdir}'
 datarootdir='${prefix}/share'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 dvidir='${docdir}'
 exec_prefix='NONE'
 host_alias=''
 htmldir='${docdir}'
 includedir='${prefix}/include'
 infodir='${datarootdir}/info'
 libdir='${exec_prefix}/lib'
 libexecdir='${exec_prefix}/libexec'
 localedir='${datarootdir}/locale'
 localstatedir='${prefix}/var'
 mandir='${datarootdir}/man'
 oldincludedir='/usr/include'
 pdfdir='${docdir}'
 prefix='NONE'
 program_transform_name='s,x,x,'
 psdir='${docdir}'
 sbindir='${exec_prefix}/sbin'
 sharedstatedir='${prefix}/com'
 sysconfdir='${prefix}/etc'
 target_alias=''

 ## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##

 /* confdefs.h */
 #define PACKAGE_NAME "Haskell terminfo package"
 #define PACKAGE_TARNAME "terminfo"
 #define PACKAGE_VERSION "0.2"
 #define PACKAGE_STRING "Haskell terminfo package 0.2"
 #define PACKAGE_BUGREPORT "judah dot jacobson at gmail dot com"
 #define PACKAGE_URL ""

 configure: exit 77

 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8683#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list