Ticket #2312 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

object splitting is not done under sparc solaris with gcc-4.2.2

Reported by: maeder Owned by:
Priority: normal Milestone:
Component: Build System Version: 6.8.2
Keywords: Cc:
Operating System: Solaris Architecture: sparc
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I've used gcc-4.2.2 and ghc-6.8.1 to build ghc-6.8.2. For some reason object splitting is not done although for ghc-6.8.1 it worked fine.

-bash-3.00$ ll hello
-rwxr-xr-x   1 maeder   wimi     3907865 May 23 11:38 hello

-bash-3.00$ ghc --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("Project version","6.8.2")
 ,("Booter version","6.8.1")
 ,("Stage","2")
 ,("Interface file version","6")
 ,("Have interpreter","YES")
 ,("Object splitting","YES")
 ,("Have native code generator","NO")
 ,("Support SMP","YES")
 ,("Unregisterised","NO")
 ,("Tables next to code","YES")
 ,("Win32 DLLs","")
 ,("RTS ways"," debug  thr thr_p thr_debug")
 ,("Leading underscore","NO")
 ]

Attachments

ghc4159_0.tgz Download (115.7 KB) - added by maeder 5 years ago.
temp files created by: ghc --make -split-objs -keep-tmp-files HughesPJ.hs
ghc12061_0.tgz Download (127.5 KB) - added by maeder 5 years ago.
successful object splitting

Change History

Changed 5 years ago by maeder

despite -split-objs the output of ar -t libraries/base/dist/build/libHSbase-3.0.1.0.a is

PrelIOUtils.o
WCsubst.o
Win32Utils.o
consUtils.o
dirUtils.o
inputReady.o
longlong.o
selectUtils.o
Concurrent_stub.o
Generics__1.o
Aliases__1.o
Basics__1.o
Instances__1.o
Schemes__1.o
Text__1.o
Twins__1.o
Concurrent__1.o
Arr__1.o
Base__1.o
Conc__1.o
ConsoleHandler__1.o
Dotnet__1.o
Enum__1.o
Environment__1.o
Err__1.o
Exception__1.o
Exts__1.o
Float__1.o
ForeignPtr__1.o
Handle__1.o
IO__1.o
IOBase__1.o
Int__1.o
List__1.o
Num__1.o
PArr__1.o
Pack__1.o
PrimopWrappers__1.o
Ptr__1.o
Read__1.o
Real__1.o
ST__1.o
STRef__1.o
Show__1.o
Stable__1.o
Storable__1.o
TopHandler__1.o
Unicode__1.o
Weak__1.o
Word__1.o
Timeout__1.o
Applicative__1.o
Arrow__1.o
Concurrent__1.o
Chan__1.o
MVar__1.o
QSem__1.o
QSemN__1.o
SampleVar__1.o
Exception__1.o
Monad__1.o
Fix__1.o
Instances__1.o
ST__1.o
Lazy__1.o
Strict__1.o
Bits__1.o
Bool__1.o
Char__1.o
Complex__1.o
Dynamic__1.o
Either__1.o
Eq__1.o
Fixed__1.o
Foldable__1.o
Function__1.o
HashTable__1.o
IORef__1.o
Int__1.o
Ix__1.o
List__1.o
Maybe__1.o
Monoid__1.o
Ord__1.o
Ratio__1.o
STRef__1.o
Lazy__1.o
Strict__1.o
String__1.o
Traversable__1.o
Tuple__1.o
Typeable__1.o
Unique__1.o
Version__1.o
Word__1.o
Trace__1.o
Foreign__1.o
C__1.o
Error__1.o
String__1.o
Types__1.o
ForeignPtr__1.o
Marshal__1.o
Alloc__1.o
Array__1.o
Error__1.o
Pool__1.o
Utils__1.o
Ptr__1.o
StablePtr__1.o
Storable__1.o
Numeric__1.o
Prelude__1.o
GetOpt__1.o
CPUTime__1.o
Environment__1.o
Exit__1.o
IO__1.o
Error__1.o
Unsafe__1.o
Info__1.o
Mem__1.o
StableName__1.o
Weak__1.o
Internals__1.o
Types__1.o
ReadP__1.o
ReadPrec__1.o
Printf__1.o
Read__1.o
Lex__1.o
Show__1.o
Functions__1.o
Coerce__1.o

Changed 5 years ago by simonmar

  • difficulty set to Unknown

What build settings are you using, if any?

Changed 5 years ago by maeder

I did not explicitly pass -fvia-C (or switched off native code generation). my mk/build.mk contains:

BIN_DIST=1
Project=Ghc
INSTALL_PROGRAM = $(INSTALL) -s -m 755
XMLDocWays = html
HADDOCK_DOCS = YES
SRC_HC_OPTS += -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
SplitObjs = YES

where SplitObjs = YES was omitted initially (without difference).

Changed 5 years ago by maeder

I may have built the old ghc-6.8.1 with on older gcc version (maybe gcc-4.0.3)

Changed 5 years ago by maeder

temp files created by: ghc --make -split-objs -keep-tmp-files HughesPJ.hs

Changed 5 years ago by maeder

object splitting works with gcc-3.4.4 (I'll attach tmp files). I've called

ghc --make -no-recomp -split-objs -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc -keep-tmp-files HughesPJ.hs

Without the ultrasparc opts gcc-3.4.4 complained about Architecture mismatch

(Requires v9|v9a|v9b; requested architecture is v8.)

Changed 5 years ago by maeder

successful object splitting

Changed 5 years ago by maeder

  • summary changed from object splitting is not done under sparc solaris to object splitting is not done under sparc solaris with gcc-4.2.2

This is also still a problem for the release candidate ghc-6.8.2.20080603

Changed 5 years ago by igloo

If you look at the .raw_s files you can see that gcc 4.2.2 has floated all the __stg_split_marker's to the top. On other platforms -fno-unit-at-a-time or -fno-toplevel-reorder have fixed this; can you find a flag to fix it for you?

For experimenting, you can compile something with ghc -v -keep-tmp-files and then rerun the gcc command that ghc runs with different flags.

Changed 5 years ago by maeder

Right, -fno-toplevel-reorder alone does the trick!

cc1: error: unrecognized command line option "-fno-unit-at-atime"

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

OK, great, should work in 6.8 branch and HEAD now, then.

Note: See TracTickets for help on using tickets.