Ticket #6306: gcc_x86_64.multilib.haiku.patch

File gcc_x86_64.multilib.haiku.patch, 2.4 KB (added by nmentley, 9 years ago)

added .patch extension to previously uploaded file

  • build/jam/BuildSetup

     
    165165HAIKU_C++ ?= $(HAIKU_CC) ;
    166166HAIKU_LINK = $(HAIKU_CC) ;
    167167HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
     168HAIKU_BOOT_LINKFLAGS = ;
    168169
    169170HAIKU_HDRS = [ FStandardHeaders ] ;
    170171HAIKU_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
    171172HAIKU_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ;
    172173HAIKU_KERNEL_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
    173174HAIKU_KERNEL_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) ;
     175HAIKU_BOOT_CCFLAGS = ;
     176HAIKU_BOOT_C++FLAGS = ;
    174177HAIKU_DEFINES = __HAIKU__ ;
    175178HAIKU_NO_WERROR ?= 0 ;
    176179
     
    246249    }
    247250    case x86_64 :
    248251    {
    249         HAIKU_DEFINES += __x86_64__ ;
    250         HAIKU_BOOT_PLATFORM = bios_ia32 ;
     252        HAIKU_BOOT_PLATFORM = bios_x86_64 ;
    251253        HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB
    252254        # offset in floppy image (>= sizeof(haiku_loader))
    253255        HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB
     256        HAIKU_NO_WERROR = 1 ;
    254257
    255258        # yasm is required for target arch x86_64
    256259        if ! $(HAIKU_YASM) {
     
    335338        HAIKU_KERNEL_PIC_CCFLAGS = -fPIE ;
    336339        HAIKU_KERNEL_PIC_LINKFLAGS = -shared -fPIE ;
    337340    }
    338 
    339341    case m68k :
    340342    {
    341343        # We don't want to have to handle emulating missing FPU opcodes for 040
     
    357359    }
    358360    case x86_64 :
    359361    {
     362        HAIKU_KERNEL_PIC_LINKFLAGS += -z max-page-size=0x1000 ;
     363
     364        HAIKU_KERNEL_PIC_CCFLAGS += -mcmodel=large ;
     365        HAIKU_KERNEL_PIC_C++FLAGS += -mcmodel=large ;
     366
     367        HAIKU_BOOT_LINKFLAGS += -m elf_i386_haiku ;
     368        HAIKU_BOOT_CCFLAGS += -m32 ;
     369        HAIKU_BOOT_C++FLAGS += -m32 ;
     370
    360371        # Enable use of the gcc built-in atomic functions instead of atomic_*().
    361372        # The former are inlined and have thus less overhead.
    362373        HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ;
     
    911922    KERNEL_DEFINES
    912923
    913924    KERNEL_CCFLAGS KERNEL_C++FLAGS
     925    BOOT_CCFLAGS BOOT_C++FLAGS BOOT_LINKFLAGS
    914926    KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS
    915927    WARNING_CCFLAGS WARNING_C++FLAGS
    916928
  • build/scripts/build_cross_tools_gcc4

     
    2727export MAKE
    2828
    2929case $haikuMachine in
     30x86_64-*)
     31    binutilsConfigureArgs="--enable-multilib"
     32    gccConfigureArgs="--enable-multilib"
     33    ;;
    3034m68k-*)
    3135    binutilsConfigureArgs="--enable-multilib"
    3236    gccConfigureArgs="--enable-multilib"