clang warnings
Hi, To test the coming GHC 7.8.3, I started to use the latest ghc-7.8 branch. Unfortunately, on my Mac, I saw many warnings which are not displayed with GHC 7.8.2: clang: warning: argument unused during compilation: '-fno-stack-protector' clang: warning: argument unused during compilation: '-D TABLES_NEXT_TO_CODE' clang: warning: argument unused during compilation: '-I test' clang: warning: argument unused during compilation: '-I dist/build/spec/spec-tmp' clang: warning: argument unused during compilation: '-I dist/build/spec/spec-tmp' clang: warning: argument unused during compilation: '-I dist/build/autogen' clang: warning: argument unused during compilation: '-I dist/build/spec/spec-tmp' Is this a known issue? --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Hi, Also I found that GHC 7.8.2 can compile yesod-bin but GHC 7.8.3 cannot: [ 1 of 10] Compiling GhcBuild ( GhcBuild.hs, dist/build/yesod/yesod-tmp/GhcBuild.o ) GhcBuild.hs:150:55: Couldn't match type ‘Phase’ with ‘Bool -> Phase’ Expected type: [(String, Maybe (Bool -> Phase))] Actual type: [(String, Maybe Phase)] In the second argument of ‘partition’, namely ‘srcs’ In the expression: partition haskellish srcs ... Failed to install yesod-bin-1.2.9.2 I have not time to investigate this by myself at this moment. --Kazu > Hi, > > To test the coming GHC 7.8.3, I started to use the latest ghc-7.8 > branch. Unfortunately, on my Mac, I saw many warnings which are not > displayed with GHC 7.8.2: > > clang: warning: argument unused during compilation: '-fno-stack-protector' > clang: warning: argument unused during compilation: '-D TABLES_NEXT_TO_CODE' > clang: warning: argument unused during compilation: '-I test' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > clang: warning: argument unused during compilation: '-I dist/build/autogen' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > > Is this a known issue? > > --Kazu > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Hi, I don't know whether or not this is new but it's worth sharing. > To test the coming GHC 7.8.3, I started to use the latest ghc-7.8 > branch. Unfortunately, on my Mac, I saw many warnings which are not > displayed with GHC 7.8.2: > > clang: warning: argument unused during compilation: '-fno-stack-protector' > clang: warning: argument unused during compilation: '-D TABLES_NEXT_TO_CODE' > clang: warning: argument unused during compilation: '-I test' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > clang: warning: argument unused during compilation: '-I dist/build/autogen' > clang: warning: argument unused during compilation: '-I > dist/build/spec/spec-tmp' > > Is this a known issue? This is due to clang of Xcode 5.1. I found that the "-Qunused-arguments" option of clang disables these warnings. I think that "ghc-clang-wrapper" should include this option. --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Would this fix #9047? Yay! On Jun 20, 2014, at 1:10 AM, Kazu Yamamoto (山本和彦) wrote: > Hi, > > I don't know whether or not this is new but it's worth sharing. > >> To test the coming GHC 7.8.3, I started to use the latest ghc-7.8 >> branch. Unfortunately, on my Mac, I saw many warnings which are not >> displayed with GHC 7.8.2: >> >> clang: warning: argument unused during compilation: '-fno-stack-protector' >> clang: warning: argument unused during compilation: '-D TABLES_NEXT_TO_CODE' >> clang: warning: argument unused during compilation: '-I test' >> clang: warning: argument unused during compilation: '-I >> dist/build/spec/spec-tmp' >> clang: warning: argument unused during compilation: '-I >> dist/build/spec/spec-tmp' >> clang: warning: argument unused during compilation: '-I dist/build/autogen' >> clang: warning: argument unused during compilation: '-I >> dist/build/spec/spec-tmp' >> >> Is this a known issue? > > This is due to clang of Xcode 5.1. I found that the > "-Qunused-arguments" option of clang disables these warnings. > > I think that "ghc-clang-wrapper" should include this option. > > --Kazu > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Hi Richard, > Would this fix #9047? Yay! I believe so. But currently "validate" itself fails: for i in driver/ghc-usage.txt driver/ghci-usage.txt includes/dist-derivedconsta nts/header/platformConstants settings; do case $i in *.a) /usr/bin/install -c -m 644 $i "/Users/kazu/work/ghc/bindisttest/install dir/lib/ghc-7.9.20140619"; ranlib "/Users/kazu/work/ghc/bindisttest/install dir/lib/ghc-7.9.20140619"/` basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i "/Users/kazu/work/ghc/bin disttest/install dir/lib/ghc-7.9.20140619" ; : "/Users/kazu/work/ghc/bindistt est/install dir/lib/ghc-7.9.20140619"/`basename $i` ;; *.so) /usr/bin/install -c -m 755 $i "/Users/kazu/work/ghc/bindisttest/install dir/lib/ghc-7.9.20140 619" ;; *.dylib) /usr/bin/install -c -m 755 $i "/Users/kazu/work/ghc/bindistte st/install dir/lib/ghc-7.9.20140619";; *) /usr/bin/install -c -m 644 $i "/Us ers/kazu/work/ghc/bindisttest/install dir/lib/ghc-7.9.20140619"; esac; done /usr/local/bin/gcc -E -m64 -undef -traditional -Wno-invalid-pp-token -Wno-unico de -Wno-trigraphs -P -DINSTALLING -DLIB_DIR='"/Users/kazu/work/ghc/bindisttest/i nstall dir/lib/ghc-7.9.20140619"' -DINCLUDE_DIR='"/Users/kazu/work/ghc/bindist test/install dir/lib/ghc-7.9.20140619/include"' -DPAPI_INCLUDE_DIR="" -DPAPI_L IB_DIR="" -DFFI_INCLUDE_DIR= -DFFI_LIB_DIR= '-DFFI_LIB="Cffi"' -x c -Iincludes - Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconsta nts/header rts/package.conf.in -o rts/dist/package.conf.install.raw clang: error: no such file or directory: 'dir/lib/ghc-7.9.20140619"' clang: error: no such file or directory: 'dir/lib/ghc-7.9.20140619/include"' In the bindisttest directory, the "dir" directory does not exist. Strangely "installdir" directory exist instead. P.S. Yesterday I could not "validate" for GHC HEAD on Linux either for another reason. --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Hi, Cloning the fresh GHC source, I can validate GHC HEAD on Linux. And I understand "install dir" is correct. The problem on Mac is that "ghc-clang-wrapper" is a shell script. I cannot find a way to treat strings, which includes spaces, correctly with shell scripts. So, I replaced "install dir" to "install_dir" in three files and can validate GHC HEAD on Mac finally. Questions: * What is the purpose of spaces in "install dir"? * Would you tell me the plan to provide C preprocessor program by GHC itself? --Kazu > Hi Richard, > >> Would this fix #9047? Yay! > > I believe so. > > But currently "validate" itself fails: > > > for i in driver/ghc-usage.txt driver/ghci-usage.txt > includes/dist-derivedconsta > nts/header/platformConstants settings; do case $i in *.a) /usr/bin/install -c > -m > 644 $i "/Users/kazu/work/ghc/bindisttest/install > dir/lib/ghc-7.9.20140619"; > ranlib "/Users/kazu/work/ghc/bindisttest/install > dir/lib/ghc-7.9.20140619"/` > basename $i` ;; *.dll) /usr/bin/install -c -m 755 $i > "/Users/kazu/work/ghc/bin > disttest/install dir/lib/ghc-7.9.20140619" ; : > "/Users/kazu/work/ghc/bindistt > est/install dir/lib/ghc-7.9.20140619"/`basename $i` ;; *.so) > /usr/bin/install > -c -m 755 $i "/Users/kazu/work/ghc/bindisttest/install > dir/lib/ghc-7.9.20140 > 619" ;; *.dylib) /usr/bin/install -c -m 755 $i > "/Users/kazu/work/ghc/bindistte > st/install dir/lib/ghc-7.9.20140619";; *) /usr/bin/install -c -m 644 $i > "/Us > ers/kazu/work/ghc/bindisttest/install dir/lib/ghc-7.9.20140619"; esac; done > /usr/local/bin/gcc -E -m64 -undef -traditional -Wno-invalid-pp-token > -Wno-unico > de -Wno-trigraphs -P -DINSTALLING > -DLIB_DIR='"/Users/kazu/work/ghc/bindisttest/i > nstall dir/lib/ghc-7.9.20140619"' > -DINCLUDE_DIR='"/Users/kazu/work/ghc/bindist > test/install dir/lib/ghc-7.9.20140619/include"' -DPAPI_INCLUDE_DIR="" > -DPAPI_L > IB_DIR="" -DFFI_INCLUDE_DIR= -DFFI_LIB_DIR= '-DFFI_LIB="Cffi"' -x c > -Iincludes - > Iincludes/dist -Iincludes/dist-derivedconstants/header > -Iincludes/dist-ghcconsta > nts/header rts/package.conf.in -o rts/dist/package.conf.install.raw > clang: error: no such file or directory: 'dir/lib/ghc-7.9.20140619"' > clang: error: no such file or directory: 'dir/lib/ghc-7.9.20140619/include"' > > > In the bindisttest directory, the "dir" directory does not exist. > Strangely "installdir" directory exist instead. > > P.S. > > Yesterday I could not "validate" for GHC HEAD on Linux either for > another reason. > > --Kazu > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
I'm the source of ghc-clang-wrapper. I can add "-Qunused-arguments" easily enough. I just last night ran across the spaces problem - and I'm not entirely sure the bug is in ghc-clang-wrapper! I'll investigate... turns out all you need to do is try to compile something that is in a directory with spaces in it. - Mark ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Hi Mark, I've already merged two changesets into 7.8.3 - https://github.com/ghc/ghc/commit/5f9e0bedc9b08b46619f8ed4d09f645d6ed4 and https://github.com/ghc/ghc/commit/fd4169f9caf6922e3e5ea9c31f497f7220fc62b8 - which add -Qunused-arguments to the C compiler invocation if the compiler is Clang. The GHC but is #9047 (The problem was Clang will ignore a lot of the flags we pass in the assembler stage, since it will be used as the assembler). So I don't think a workaround will be needed. On Mon, Jun 23, 2014 at 3:04 PM, Mark Lentczner wrote: > I'm the source of ghc-clang-wrapper. I can add "-Qunused-arguments" easily > enough. > > I just last night ran across the spaces problem - and I'm not entirely sure > the bug is in ghc-clang-wrapper! I'll investigate... turns out all you need > to do is try to compile something that is in a directory with spaces in it. > > - Mark > > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://www.haskell.org/mailman/listinfo/ghc-devs > -- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
Austin, > I've already merged two changesets into 7.8.3 - > https://github.com/ghc/ghc/commit/5f9e0bedc9b08b46619f8ed4d09f645d6ed4 > and https://github.com/ghc/ghc/commit/fd4169f9caf6922e3e5ea9c31f497f7220fc62b8 > - which add -Qunused-arguments to the C compiler invocation if the > compiler is Clang. The GHC but is #9047 > > (The problem was Clang will ignore a lot of the flags we pass in the > assembler stage, since it will be used as the assembler). So I don't > think a workaround will be needed. Great. I confirmed that I can validate both GHC HEAD and the ghc-7.8 branch on Mac WITHOUT ghc-clang-wrapper. --Kazu ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings
I ran a validate myself on OS X this evening, i can confirm things worked too :) On Mon, Jun 23, 2014 at 8:55 PM, Kazu Yamamoto wrote: > Austin, > > > I've already merged two changesets into 7.8.3 - > > > https://github.com/ghc/ghc/commit/5f9e0bedc9b08b46619f8ed4d09f645d6ed4 > > and > https://github.com/ghc/ghc/commit/fd4169f9caf6922e3e5ea9c31f497f7220fc62b8 > > - which add -Qunused-arguments to the C compiler invocation if the > > compiler is Clang. The GHC but is #9047 > > > > (The problem was Clang will ignore a lot of the flags we pass in the > > assembler stage, since it will be used as the assembler). So I don't > > think a workaround will be needed. > > Great. > > I confirmed that I can validate both GHC HEAD and the ghc-7.8 branch > on Mac WITHOUT ghc-clang-wrapper. > > --Kazu > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://www.haskell.org/mailman/listinfo/ghc-devs > ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
clang warnings with unregisterised
Devs, I have built an UNREGISTERISED GHC, and the C-compiler used behind the scenes is clang. Now I get literally millions of warnings of the below kind: +/var/folders/k9/fj_1d5h17m7c4gbyp2srqrhmgq/T/ghc11601_0/ghc11601_4.hc:688:1: + warning: attribute declaration must precede definition [-Wignored-attributes] +II_(s4Vv_closure); +^ + +/Users/ggreif/ghc-head/includes/Stg.h:213:63: + note: expanded from macro 'II_' +#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8)) + ^ + +/Users/ggreif/ghc-head/includes/Stg.h:175:42: + note: expanded from macro 'GNU_ATTRIBUTE' +#define GNU_ATTRIBUTE(at) __attribute__((at)) + ^ + +/var/folders/k9/fj_1d5h17m7c4gbyp2srqrhmgq/T/ghc11601_0/ghc11601_4.hc:588:16: + note: previous definition is here +static StgWord s4Vv_closure[] = { + ^ It seems like the "II_" and "EI_" prototypes *follow* the real thing, and because clang is more picky with attribute placement, we get all those warnings. compiler/cmm/PprC.hs:pprExternDecl is the function that puts together the "II_(...)" and "EI_(...)", but where does the "static StgWord s4Vv_closure[] = {" come from? I just want to flip the order of their occurrence. Thanks, Gabor ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: clang warnings with unregisterised
On Fri, 29 Aug 2014 02:56:01 +0200 Gabor Greif wrote: > Devs, > > I have built an UNREGISTERISED GHC, and the C-compiler used behind the > scenes is clang. Now I get literally millions of warnings of the below > kind: > > > +/var/folders/k9/fj_1d5h17m7c4gbyp2srqrhmgq/T/ghc11601_0/ghc11601_4.hc:688:1: > + warning: attribute declaration must precede definition > [-Wignored-attributes] > +II_(s4Vv_closure); > +^ > + > +/Users/ggreif/ghc-head/includes/Stg.h:213:63: > + note: expanded from macro 'II_' > +#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8)) > + ^ > + > +/Users/ggreif/ghc-head/includes/Stg.h:175:42: > + note: expanded from macro 'GNU_ATTRIBUTE' > +#define GNU_ATTRIBUTE(at) __attribute__((at)) > + ^ > + > +/var/folders/k9/fj_1d5h17m7c4gbyp2srqrhmgq/T/ghc11601_0/ghc11601_4.hc:588:16: > + note: previous definition is here > +static StgWord s4Vv_closure[] = { > + ^ > > It seems like the "II_" and "EI_" prototypes *follow* the real thing, > and because clang is more picky with attribute placement, we get all > those warnings. They just occur many times in the source, thus not only before but also after definition. > compiler/cmm/PprC.hs:pprExternDecl is the function that puts together > the "II_(...)" and "EI_(...)", but where does the "static StgWord > s4Vv_closure[] = {" come from? pprWordArray :: CLabel -> [CmmStatic] -> SDoc > I just want to flip the order of their occurrence. I think it would be a good thing to split .hc file lifting all external and local declarations up (and print only unique ones). It should shrink .hc file size a bit and make it nicer to read. -- Sergei signature.asc Description: PGP signature ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs