Commit c776a6d0 by Daniel Franke Committed by Daniel Franke

re PR target/36348 (f951 link failure on i686-apple-darwin9)

gcc:
2008-05-29  Daniel Franke  <franke.daniel@gmail.com>

        PR target/36348
        * config/darwin-f.c: New.
        * config/t-darwin: Added rule to build darwin-f.o.
        * config.gcc: Defined new variable, fortran_target_objs.
        (*-*-darwin*): Set fortran_target_objs.
        * Makefile.in: Defined new variable FORTRAN_TARGET_OBJS.
        * configure.ac: Substitute fortran_target_objs, set
        FORTRAN_TARGET_OBJS.
        * configure: Regenerated.

gcc/fortran:
2008-05-29  Daniel Franke  <franke.daniel@gmail.com>

        PR target/36348
        * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.

From-SVN: r136178
parent aecaad79
2008-05-29 Daniel Franke <franke.daniel@gmail.com>
PR target/36348
* config/darwin-f.c: New.
* config/t-darwin: Added rule to build darwin-f.o.
* config.gcc: Defined new variable, fortran_target_objs.
(*-*-darwin*): Set fortran_target_objs.
* Makefile.in: Defined new variable FORTRAN_TARGET_OBJS.
* configure.ac: Substitute fortran_target_objs, set
FORTRAN_TARGET_OBJS.
* configure: Regenerated.
2008-05-29 H.J. Lu <hongjiu.lu@intel.com>
PR target/35771
......
......@@ -970,6 +970,9 @@ C_TARGET_OBJS=@c_target_objs@
# Target specific, C++ specific object file
CXX_TARGET_OBJS=@cxx_target_objs@
# Target specific, Fortran specific object file
FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc driver.
GCC_OBJS = gcc.o opts-common.o gcc-options.o
......
......@@ -120,6 +120,9 @@
# cxx_target_objs List of extra target-dependent objects that be
# linked into the C++ compiler only.
#
# fortran_target_objs List of extra target-dependent objects that be
# linked into the fortran compiler only.
#
# target_gtfiles List of extra source files with type information.
#
# xm_defines List of macros to define when compiling for the
......@@ -173,6 +176,7 @@ extra_gcc_objs=
extra_options=
c_target_objs=
cxx_target_objs=
fortran_target_objs=
tm_defines=
xm_defines=
# Set this to force installation and use of collect2.
......@@ -433,6 +437,7 @@ case ${target} in
extra_options="${extra_options} darwin.opt"
c_target_objs="darwin-c.o"
cxx_target_objs="darwin-c.o"
fortran_target_objs="darwin-f.o"
extra_objs="darwin.o"
extra_gcc_objs="darwin-driver.o"
default_use_cxa_atexit=yes
......
/* Darwin support needed only by Fortran frontends.
Copyright (C) 2008 Free Software Foundation, Inc.
Contributed by Daniel Franke.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Provide stubs for the hooks defined by darwin.h
TARGET_EXTRA_PRE_INCLUDES, TARGET_EXTRA_INCLUDES
As both, gcc and gfortran link in incpath.o, we can not
conditionally undefine said hooks if fortran is build.
However, we can define do-nothing stubs of said hooks as
we are not interested in objc include files in Fortran.
The hooks original purpose (see also darwin-c.c):
* darwin_register_objc_includes
Register the GNU objective-C runtime include path if STDINC.
* darwin_register_frameworks
Register all the system framework paths if STDINC is true and setup
the missing_header callback for subframework searching if any
frameworks had been registered. */
#include "ansidecl.h"
/* Prototypes for functions below to avoid a lengthy list of includes
to achieve the same. */
void darwin_register_objc_includes (const char *, const char *, int);
void darwin_register_frameworks (const char *, const char *, int);
void
darwin_register_objc_includes (const char *sysroot ATTRIBUTE_UNUSED,
const char *iprefix ATTRIBUTE_UNUSED,
int stdinc ATTRIBUTE_UNUSED)
{
}
void
darwin_register_frameworks (const char *sysroot ATTRIBUTE_UNUSED,
const char *iprefix ATTRIBUTE_UNUSED,
int stdinc ATTRIBUTE_UNUSED)
{
}
......@@ -10,6 +10,10 @@ darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
incpath.h flags.h $(C_COMMON_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES)
darwin-f.o: $(srcdir)/config/darwin-f.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/darwin-f.c $(PREPROCESSOR_DEFINES)
gt-darwin.h : s-gtype ; @true
darwin-driver.o: $(srcdir)/config/darwin-driver.c \
......
......@@ -3803,6 +3803,7 @@ AC_SUBST(xm_include_list)
AC_SUBST(xm_defines)
AC_SUBST(c_target_objs)
AC_SUBST(cxx_target_objs)
AC_SUBST(fortran_target_objs)
AC_SUBST(target_cpu_default)
AC_SUBST_FILE(language_hooks)
......
2008-05-29 Daniel Franke <franke.daniel@gmail.com>
PR target/36348
* Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* scanner.c (load_line): Add first_char argument. Don't call ungetc.
......
......@@ -61,7 +61,7 @@ F95_PARSER_OBJS = fortran/arith.o fortran/array.o fortran/bbt.o \
fortran/resolve.o fortran/scanner.o fortran/simplify.o fortran/st.o \
fortran/symbol.o fortran/target-memory.o
F95_OBJS = $(F95_PARSER_OBJS) \
F95_OBJS = $(F95_PARSER_OBJS) $(FORTRAN_TARGET_OBJS) \
fortran/convert.o fortran/dependency.o fortran/f95-lang.o \
fortran/trans.o fortran/trans-array.o fortran/trans-common.o \
fortran/trans-const.o fortran/trans-decl.o fortran/trans-expr.o \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment