make-rules/shared-macros.mk
changeset 459 c7579764bc73
parent 454 1ef5e4f29411
child 477 068d10529156
equal deleted inserted replaced
458:2edc011b559e 459:c7579764bc73
   421 studio_IROPTS =		$(studio_IROPTS.$(MACH))
   421 studio_IROPTS =		$(studio_IROPTS.$(MACH))
   422 
   422 
   423 # Control register usage for generated code.  SPARC ABI requires system
   423 # Control register usage for generated code.  SPARC ABI requires system
   424 # libraries not to use application registers.  x86 requires 'no%frameptr' at
   424 # libraries not to use application registers.  x86 requires 'no%frameptr' at
   425 # x04 or higher.
   425 # x04 or higher.
   426 studio_XREGS.sparc =	-xregs=no%appl,float
   426 
       
   427 # We should just use -xregs but we need to workaround 7030022. Note
       
   428 # that we can't use the (documented) -Wc,-xregs workaround because
       
   429 # libtool really hates -Wc and thinks it should be -Wl. Instead
       
   430 # we use an (undocumented) option which actually happens to be what
       
   431 # CC would use.
       
   432 studio_XREGS.sparc =	-Qoption cg -xregs=no%appl
   427 studio_XREGS.i386 =	-xregs=no%frameptr
   433 studio_XREGS.i386 =	-xregs=no%frameptr
   428 studio_XREGS =		$(studio_XREGS.$(MACH))
   434 studio_XREGS =		$(studio_XREGS.$(MACH))
       
   435 
       
   436 gcc_XREGS.sparc =	-mno-app-regs
       
   437 gcc_XREGS.i386 =
       
   438 gcc_XREGS =		$(gcc_XREGS.$(MACH))
   429 
   439 
   430 # Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit
   440 # Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit
   431 # objects and 16 byte alignment for 64 bit objects.  This is added to CFLAGS by
   441 # objects and 16 byte alignment for 64 bit objects.  This is added to CFLAGS by
   432 # default.
   442 # default.
   433 studio_ALIGN.sparc.32 =	-xmemalign=8s
   443 studio_ALIGN.sparc.32 =	-xmemalign=8s
   477 # with CFLAGS += $(FEATURE_MACRO) and add to the component build with
   487 # with CFLAGS += $(FEATURE_MACRO) and add to the component build with
   478 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.  In most cases, it
   488 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.  In most cases, it
   479 # should not be necessary to add CFLAGS to any environment other than the
   489 # should not be necessary to add CFLAGS to any environment other than the
   480 # configure environment.
   490 # configure environment.
   481 CFLAGS.gcc +=	$(gcc_OPT)
   491 CFLAGS.gcc +=	$(gcc_OPT)
       
   492 CFLAGS.gcc +=	$(gcc_XREGS)
   482 
   493 
   483 
   494 
   484 # Build 32 or 64 bit objects.
   495 # Build 32 or 64 bit objects.
   485 CFLAGS +=	$(CC_BITS)
   496 CFLAGS +=	$(CC_BITS)
   486 
   497