RE: trying to build from cvs - "cc1: bad value (athlonmp) for -march= switch"

-------------------------------------------------------------- ---------- ==fptools== make all -wr; in /home/shae/build/haskell/fpbuild/ghc/rts -------------------------------------------------------------- ---------- ../../ghc/compiler/ghc-inplace -optc-O -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-I../includes -optc-I. -optc-Iparallel -optc-DCOMPILING_RTS -optc-O2 -optc-fomit-frame-pointer -optc-mpreferred-stack-boundary=2 -optc-march=athlonmp -optc-DTHREADED_RTS -H16m -O -O2 -static -c Adjustor.c -o Adjustor.o cc1: bad value (athlonmp) for -march= switch cc1: bad value (athlonmp) for -mcpu= switch make[2]: *** [Adjustor.o] Error 1 make[1]: *** [all] Error 1
running "gcc -v" gives: Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20021231 (Debian prerelease)
Athlon MP is the correct arch/cpu, and gcc 3.2.2 has -march=athlonmp available. Any ideas?
Are you sure that GHC is running the same gcc? Try 'ghc -v -fvia-C' on some small Haskell source file. Cheers, Simon

This may be related to the answer just given to do with finalizing the Handles, as I have a problem with sockets hanging around after a host name resolution has failed (using the simple socket library). Having looked at the code I would like to suggest the following change: connectTo hostname (PortNumber port) = do proto <- getProtocolNumber "tcp" sock <- socket AF_INET Stream proto he <- getHostByName hostname connect sock (SockAddrInet port (hostAddress he)) socketToHandle sock ReadWriteMode Should become: connectTo hostname (PortNumber port) = do proto <- getProtocolNumber "tcp" sock <- socket AF_INET Stream proto (do he <- getHostByName hostname connect sock (SockAddrInet port (hostAddress he)) socketToHandle sock ReadWriteMode) `Exception.catch` (\e -> do sClose sock;throw e) Is this a sensible change to make? Regards, Keean Schupke.
participants (2)
-
Keean Schupke
-
Simon Marlow