Ticket #1739: legacy-gcc-haiku-compile-fix.diff

File legacy-gcc-haiku-compile-fix.diff, 1.5 kB (added by nielx, 3 months ago)

Fix for building the legacy gcc compiler for haiku

  • gcc/gthr-beos.h

    old new  
    4141#undef MIN 
    4242#endif 
    4343 
     44/*  When cross-compiling a native compiler on a linux build machine, 
     45    gcc uses its own limits.h, which does not define NAME_MAX. Do it here */ 
     46 
     47#ifndef NAME_MAX 
     48#define NAME_MAX (256) 
     49#endif 
     50 
    4451#include <OS.h> 
    4552 
    4653typedef int32 __gthread_mutex_t; 
  • gcc/protoize.c

    old new  
    6262#undef abort 
    6363 
    6464#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN) 
    65 #if defined(POSIX) || defined(CONCURRENT) 
     65#if defined(POSIX) || defined(CONCURRENT) || defined(__BEOS__) 
    6666#include <dirent.h> 
    6767#else 
    6868#include <sys/dir.h> 
  • gcc/fixinc/mkfixinc.sh

    old new  
    4444    i?86-*-moss* | \ 
    4545    i?86-*-pe | \ 
    4646    i?86-*-cygwin* | \ 
     47    i?86-pc-beos | \ 
    4748    i?86-*-mingw32* | \ 
    4849    i?86-*-uwin* | \ 
    4950    i?86-*-interix* | \ 
     
    7273#  OK.  We gotta make the thing. 
    7374#  make and install either the binary or the default script 
    7475 
    75 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\"" 
     76defs="SHELL=\"$SHELL\" CC=\"$CC_FOR_BUILD\" CFLAGS=\"$CFLAGS_FOR_BUILD\" LDFLAGS=\"$LDFLAGS\"" 
    7677cmd="$MAKE ${defs} install-bin" 
    7778echo $cmd 
    7879eval $cmd