Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: Type: feature request | Status: closed Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: fixed Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Changes (by igloo): * status: new = closed * resolution: = fixed Comment: GHC now builds for the platform of the bootstrapping compiler, so this bug is now fixed. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Changes (by simonmar): * owner: simonmar = -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by simonmar): Sigh. If we fix `config.guess` then we ought to push the patch back upstream. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by kgardas): Indeed! But the change is pretty simple and isolated to Solaris. See attach fix. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by simonmar): Patch committed. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by simonmar): So `./configure` is actually misreporting your platform, because your platform by default is really `i386-pc-solaris`. Perhaps it is picking up a different C compiler somewhere that generates 64-bit code? Try investigating which $CC is used in `config.guess` vs. when calling it via `./configure`, and also which options are passed to $CC if any. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by simonmar): The platform test in `config.guess` doesn't pass any `-m64` options to gcc, all it does is test whether `__amd64` is defined. So doesn't that mean that the C compiler on your platform is generating 64-bit objects by default? I am still confused. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by kgardas): Not at all! GCC by default generates 32bit code: {{{ ka...@silence:/tmp$ cat hello.c int main() { return 0; } ka...@silence:/tmp$ gcc -o hello hello.c ka...@silence:/tmp$ file hello hello: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available ka...@silence:/tmp$ }}} In addition this define is not defined by default, but when you use -m64 option. Then it's used. BTW: I'm also a little bit confused by the fact that when I invoke config.guess from the command-line it claims it's running on i386-pc-solaris, but if I run ./configure then it shows x86_64 -unknown-solaris... -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by simonmar): I'm confused. `x86_64-pc-solaris2` is not a platform we currently support. I made the first step towards supporting this platform, namely to update `config.guess` to recognise the platform. Why then do you want to map the platform to `i386-pc-solaris`? Won't that go wrong, because gcc is generating code for x86_64? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by kgardas): It is simple, Solaris on amd64 aka x86_64 platform supports two ABI: one 64bit and one 32bit. Till now using older version of config.guess my amd64/solaris box was recognized as i386-solaris and GHC behaves accordingly and builds well (for i386-solaris2). Since your config.guess update, GHC knows it's configured on amd64-solaris and complains about unsupported platform. So my fix is natural fix to make GHC again believe this is i386-solaris as it supports it all the time. Of course it's very easy for anyone interested just to revert this simple patch and hack on real amd64-solaris platform support. Is it more clear now? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by kgardas): I would also like to add my analysis, if you don't have amd64/solaris2 platform at hands. So Solaris supports 2 ABIs, provides gcc 3.4.3 which by default generates 32bit code for i386 ABI. It might be also used to generate 64bit code for amd64 ABI if started with -m64 command-line option. If I'm right, then for GHC build, we do have i386 ABI GHC for Solaris in binary form and so stage1 compiler should also be compiled for i386, but it should be a cross-compiler run on i386 generating code for amd64 ABI. Stage2 compiler should then be amd64 ABI and also in stage2 build and rts build executed gcc should be used with -m64 option to get 64bit binary. Now, the question is just where to hack to make it real. :-) (if I'm right of course) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Changes (by simonmar): * owner: = simonmar * difficulty: = Unknown -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Changes (by simonmar): * milestone: = 6.12 branch Comment: I updated `config.guess`, so the platform will now be recognised. There's still a lot to do to support this platform, though. {{{ Fri Jan 16 09:53:11 GMT 2009 Simon Marlow marlo...@gmail.com * Update config.guess, config.sub and install.sh from automake-1.10.2 In particular, config.guess should now know about x86_64-pc-solaris2 }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas |Owner: simonmar Type: feature request | Status: new Priority: normal |Milestone: 6.12 branch Component: Compiler | Version: 6.10.1 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Os: Solaris Architecture: x86_64 (amd64) | +--- Comment (by kgardas): BTW: with the patch provided by Simon, current GHC head is completely broken on amd64/solaris: ka...@silence:~/vcs/ghc$ ./configure checking for GHC version date... sed: Missing newline at end of file standard input. inferred 6.11.20090116 checking build system type... x86_64-pc-solaris2.11 checking host system type... x86_64-pc-solaris2.11 checking target system type... x86_64-pc-solaris2.11 Unrecognised platform: x86_64-pc-solaris2.11 ka...@silence:~/vcs/ghc$ the fix is obvious, hack configure.ac to make x86_64-pc-solaris equal to i386-pc-solaris. If nobody steps in, I'll provide such change shortly. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #2951: Add support for amd64-solaris2 platform
#2951: Add support for amd64-solaris2 platform +--- Reporter: kgardas | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler Version: 6.10.1 | Severity: normal Keywords: | Testcase: Os: Solaris | Architecture: x86_64 (amd64) +--- Hello, it would be nice if GHC build correctly detects if it's running on amd64 platform or plain old i386 platform. The problem is that current config.guess returns in both cases i386-pc-solaris2.* string. Certainly there is a possibility to use `isainfo -n` to test for application supported instruction set, see: {{{ ka...@silence:~/vcs/ghc$ ./config.guess i386-pc-solaris2.11 ka...@silence:~/vcs/ghc$ isainfo -n amd64 ka...@silence:~/vcs/ghc$ }}} I'm just not sure if hacking configure.ac's code below {{{ i[[3456]]86-*-solaris2*) HostPlatform=i386-unknown-solaris2 # hack again TargetPlatform=i386-unknown-solaris2 BuildPlatform=i386-unknown-solaris2 HostPlatform_CPP='i386_unknown_solaris2' HostArch_CPP='i386' HostVendor_CPP='unknown' HostOS_CPP='solaris2' ;; }}} and changing HostArch_CPP from 'i386' to 'x86_64' would be enough for the change. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2951 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs