This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] [committed] first step to get libobjc back and building and working on Darwin
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Tue, 25 May 2004 18:38:46 -0400
- Subject: [PATCH] [committed] first step to get libobjc back and building and working on Darwin
This is the first step to get back libobjc building, the GNU's libobjc
is now called libobjc-gnu and the include directory is
include-gnu-runtime.
Thanks,
Andrew Pinski
ChangeLog:
2004-05-25 Andrew Pinski <pinskia@physics.uc.edu>
PR target/11572
* configure.ac (includedir): Set to "include"
except for Darwin.
(libext) Set to empty except for Darwin.
* configure: Regenerate
* Makefile.in: s/libobjc.la/libobjc$(libext).la/g.
s/include/$(includedir)/g.
Patch:
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/Makefile.in,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile.in
--- Makefile.in 25 May 2004 19:37:01 -0000 1.39
+++ Makefile.in 25 May 2004 22:27:00 -0000
@@ -40,6 +40,9 @@ toolexecdir = @toolexecdir@
# Toolexecdir is used only by toolexeclibdir
toolexeclibdir = @toolexeclibdir@
+includedir = @includedir@
+libext = @libext@
+
top_builddir = .
libdir = $(exec_prefix)/lib
@@ -128,7 +131,7 @@ FLAGS_TO_PASS = \
"libsubdir=$(libsubdir)" \
"tooldir=$(tooldir)"
-all: libobjc.la $(OBJC_BOEHM_GC)
+all: libobjc$(libext).la $(OBJC_BOEHM_GC)
: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
# User-visible header files.
@@ -252,12 +255,12 @@ $(OBJC_THREAD_FILE)_gc.lo: $(OBJC_THREAD
doc: info dvi html
-libobjc.la: $(OBJS)
+libobjc$(libext).la: $(OBJS)
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
-rpath $(toolexeclibdir) \
-version-info $(LIBOBJC_VERSION)
-libobjc_gc.la: $(OBJS_GC)
+libobjc_gc$(libext).la: $(OBJS_GC)
$(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
-rpath $(toolexeclibdir) \
-version-info $(LIBOBJC_GC_VERSION)
@@ -311,9 +314,9 @@ install: install-libs install-headers
install-libs: installdirs
$(SHELL) $(toplevel_srcdir)/mkinstalldirs $(DESTDIR)$(toolexeclibdir)
- $(LIBTOOL_INSTALL) $(INSTALL) libobjc.la $(DESTDIR)$(toolexeclibdir);
+ $(LIBTOOL_INSTALL) $(INSTALL) libobjc$(libext).la
$(DESTDIR)$(toolexeclibdir);
if [ "$(OBJC_BOEHM_GC)" ]; then \
- $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc.la \
+ $(LIBTOOL_INSTALL) $(INSTALL) libobjc_gc$(libext).la \
$(DESTDIR)$(toolexeclibdir);\
fi
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO="$@"
@@ -321,16 +324,16 @@ install-libs: installdirs
# Copy Objective C headers to installation include directory.
install-headers:
- $(SHELL) $(toplevel_srcdir)/mkinstalldirs
$(DESTDIR)$(libsubdir)/include/objc
+ $(SHELL) $(toplevel_srcdir)/mkinstalldirs
$(DESTDIR)$(libsubdir)/$(includedir)/objc
for file in $(OBJC_H); do \
realfile=$(srcdir)/objc/$${file}; \
- $(INSTALL_DATA) $${realfile} $(DESTDIR)$(libsubdir)/include/objc; \
+ $(INSTALL_DATA) $${realfile}
$(DESTDIR)$(libsubdir)/$(includedir)/objc; \
done
check uninstall install-strip dist installcheck installdirs:
mostlyclean:
- -$(LIBTOOL_CLEAN) rm -f libobjc.la libobjc_gc.la *.lo
+ -$(LIBTOOL_CLEAN) rm -f libobjc$(libext).la libobjc_gc$(libext).la
*.lo
-rm -f runtime-info.h tmp-runtime.s *.o *.lo libobjc* xforward \
fflags *.aux *.cp *.dvi *.fn *.info *.ky *.log *.pg \
*.toc *.tp *.vr *.html libobj.exp
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/configure.ac,v
retrieving revision 1.4
diff -u -p -r1.4 configure.ac
--- configure.ac 15 Apr 2004 17:05:36 -0000 1.4
+++ configure.ac 25 May 2004 22:27:00 -0000
@@ -154,6 +154,20 @@ esac
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)
+# Figure out if we want to name the include directory and the
+# library name changes differently.
+includedir=include
+libext=
+case "${host}" in
+ *-darwin*)
+ # Darwin is the only target so far that needs a different include
directory.
+ includedir=gnu-runtime;
+ libext=-gnu
+ ;;
+esac
+AC_SUBST(includedir)
+AC_SUBST(libext)
+
# --------
# Programs
# --------
Attachment:
temp.diff.txt
Description: Text document