diff -u -r gcc_42-5531.apple/build_gcc gcc_42-5531/build_gcc --- gcc_42-5531.apple/build_gcc 2007-07-31 20:40:49.000000000 -0400 +++ gcc_42-5531/build_gcc 2007-11-18 13:51:06.000000000 -0500 @@ -103,7 +103,7 @@ CONFIGFLAGS="--disable-checking -enable-werror \ --prefix=$DEST_ROOT \ --mandir=\${prefix}/share/man \ - --enable-languages=c,objc,c++,obj-c++ \ + --enable-languages=c,objc,c++,obj-c++,fortran \ --program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \ --with-gxx-include-dir=\${prefix}/include/c++/$LIBSTDCXX_VERSION \ --with-slibdir=/usr/lib \ @@ -294,6 +294,8 @@ $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gcc-$VERS || exit 1 lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-g++-$VERS -create \ $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-g++* || exit 1 + lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gfortran-$VERS -create \ + $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gfortran* || exit 1 done # lib @@ -303,7 +305,7 @@ .$DEST_ROOT/lib/gcc || exit 1 done -# And copy libgomp stuff by hand... +# And copy libgomp and libgfortran stuff by hand... for t in $TARGETS ; do for h in $HOSTS ; do if [ $h = $t ] ; then @@ -311,16 +313,22 @@ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1 cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/libgomp.spec \ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1 + cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/libgfortran.a \ + .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1 if [ $h = 'powerpc' ] ; then cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.a \ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/ || exit 1 cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.spec \ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/ || exit 1 + cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgfortran.a \ + .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/ || exit 1 elif [ $h = 'i686' ] ; then cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgomp.a \ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1 cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgomp.spec \ .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1 + cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgfortran.a \ + .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1 fi fi done @@ -388,6 +396,16 @@ -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \ -L$DIR/obj-$h-$BUILD/libiberty/ \ -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-g++-$MAJ_VERS || exit 1 + + $DEST_DIR$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \ + $ORIG_SRC_DIR/driverdriver.c \ + -DPDN="\"-apple-darwin$DARWIN_VERS-gfortran-$VERS\"" \ + -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \ + -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \ + -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \ + -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \ + -L$DIR/obj-$h-$BUILD/libiberty/ \ + -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-gfortran-$MAJ_VERS || exit 1 done lipo -output $DEST_DIR/$DEST_ROOT/bin/gcc-$MAJ_VERS -create \ @@ -396,10 +414,14 @@ lipo -output $DEST_DIR/$DEST_ROOT/bin/g++-$MAJ_VERS -create \ $DEST_DIR/$DEST_ROOT/bin/tmp-*-g++-$MAJ_VERS || exit 1 +lipo -output $DEST_DIR/$DEST_ROOT/bin/gfortran-$MAJ_VERS -create \ + $DEST_DIR/$DEST_ROOT/bin/tmp-*-gfortran-$MAJ_VERS || exit 1 + ln -f $DEST_DIR/$DEST_ROOT/bin/g++-$MAJ_VERS $DEST_DIR/$DEST_ROOT/bin/c++-$MAJ_VERS || exit 1 rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gcc-$MAJ_VERS || exit 1 rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-g++-$MAJ_VERS || exit 1 +rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gfortran-$MAJ_VERS || exit 1 ######################################## # Create SYM_DIR with information required for debugging. @@ -425,7 +447,7 @@ ######################################## # Remove debugging information from DEST_DIR. -find $DEST_DIR -perm -0111 \! -name fixinc.sh \ +find $DEST_DIR -perm -0111 \! -name fixinc.sh \! -name libgfortran\* \ \! -name mkheaders \! -name libstdc++.dylib -type f -print \ | xargs strip || exit 1 find $DEST_DIR -name \*.a -print | xargs strip -SX || exit 1 diff -u -r gcc_42-5531.appl/gcc/config/rs6000/rs6000.c gcc_42-5531/gcc/config/rs6000/rs6000.c --- gcc_42-5531.apple/gcc/config/rs6000/rs6000.c 2007-08-02 14:03:19.000000000 -0400 +++ gcc_42-5531/gcc/config/rs6000/rs6000.c 2007-11-16 18:56:17.000000000 -0500 @@ -81,6 +81,8 @@ #define TARGET_NO_PROTOTYPE 0 #endif +int disable_typechecking_for_spec_flag; + #define min(A,B) ((A) < (B) ? (A) : (B)) #define max(A,B) ((A) > (B) ? (A) : (B)) diff -uN gcc-4.2.2/gcc/fortran/Make-lang.in gcc_42-5531/gcc/fortran/Make-lang.in --- gcc-4.2.2/gcc/fortran/Make-lang.in 2007-08-31 04:27:50.000000000 -0400 +++ gcc_42-5531/gcc/fortran/Make-lang.in 2007-11-16 18:42:25.000000000 -0500 @@ -73,7 +73,7 @@ fortran/trans.o fortran/trans-array.o fortran/trans-common.o \ fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \ fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \ - fortran/trans-stmt.o fortran/trans-types.o + fortran/trans-stmt.o fortran/trans-types.o fortran/fake.o # GFORTRAN uses GMP for its internal arithmetics. F95_LIBS = $(GMPLIBS) $(LIBS) @@ -106,7 +106,7 @@ f951$(exeext): $(F95_OBJS) \ $(BACKEND) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ - $(F95_OBJS) $(BACKEND) $(F95_LIBS) + $(F95_OBJS) $(BACKEND) $(F95_LIBS) stub-objc.o gt-fortran-trans.h : s-gtype; @true # diff -uN gcc-4.2.2/gcc/fortran/fake.c gcc_42-5531/gcc/fortran/fake.c --- gcc-4.2.2/gcc/fortran/fake.c 1969-12-31 19:00:00.000000000 -0500 +++ gcc_42-5531/gcc/fortran/fake.c 2007-11-16 18:45:01.000000000 -0500 @@ -0,0 +1,24 @@ +#include +#include + +#define MK_FAKE(X) void X (void); void X (void) { fprintf(stderr, "** FATAL: call to an unsupported function!\n"); exit(1); } + +MK_FAKE(build_function_call) +MK_FAKE(build_modify_expr) +MK_FAKE(build_stmt) +MK_FAKE(decl_attributes) +MK_FAKE(decl_constant_value) +MK_FAKE(flag_iasm_blocks) +MK_FAKE(iasm_addr) +MK_FAKE(iasm_build_bracket) +MK_FAKE(iasm_force_constraint) +MK_FAKE(iasm_get_register_var) +MK_FAKE(iasm_in_operands) +MK_FAKE(iasm_is_pseudo) +MK_FAKE(iasm_print_operand) +MK_FAKE(iasm_state) +MK_FAKE(lookup_name) +MK_FAKE(parse_in) +MK_FAKE(pointer_int_sum) +MK_FAKE(store_init_value) +