mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Apple compiler checking, other fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@19806 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02009427e9
commit
7954dc3422
7 changed files with 79 additions and 47 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-07-31 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Add checks for specific Apple compiler flags.
|
||||
* target.make (darwin): Use them. Don't add no-cpp-precomp flag
|
||||
when compiling with Apple compiler.
|
||||
|
||||
* Documentation/README.Darwin: Minor fixes (Patch from
|
||||
lars.sonchocky-helldorf@hamburg.de).
|
||||
|
||||
* Master/source-distribution.make: Add CVS_TAG_NAME variable.
|
||||
|
||||
2004-07-11 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Instance/palette.make: Updated the palette.make to create
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
Date : 15-Jan-2004
|
||||
Last update: 4-Mar-2004 (tested under Mac OS X 10.3 / Darwin 7)
|
||||
Last update: 20040727 (tested under Mac OS X 10.3 / Darwin 7)
|
||||
--> must be verified on x86-darwin-7, powerpc-apple-darwin-6
|
||||
Authors: Adam Fedor <fedor@gnu.org>
|
||||
Quentin Mathé <qmathe@club-internet.fr>
|
||||
Lars S.-Helldorf <lars.sonchocky-helldorf@hamburg.de>
|
||||
|
||||
PURPOSE
|
||||
-------
|
||||
|
@ -107,13 +108,13 @@ objcruntime-foundation-applicationkit
|
|||
Theoretically possible are:
|
||||
|
||||
gnu-gnu-gnu # gnu-objc runtime with gnustep-base and gnustep-gui. Most
|
||||
widely tested.
|
||||
# widely tested.
|
||||
apple-gnu-gnu # apple-objc runtime with gnustep libraries. Does currently
|
||||
not work
|
||||
# not work
|
||||
apple-apple-gnu # Apple Foundation with gnustep-gui on the top. Only of
|
||||
academically interest.
|
||||
# academically interest.
|
||||
apple-apple-apple # Cocoa with GNUstep additions. For porting GNUstep apps to
|
||||
Cocoa.
|
||||
# Cocoa.
|
||||
|
||||
All gnu-*-apple library combos are purely theoretical and only available to the
|
||||
folks inside Apple since no mortal person ever saw the Cocoa source code. ;-)
|
||||
|
@ -163,13 +164,13 @@ Darwin x86:
|
|||
|
||||
FSF GCC is difficult to compile here. The only way I could do it was like this:
|
||||
|
||||
ln -s /usr/bin/c++filt /usr/bin/c++filt3 # missing on Darwin x86 ?
|
||||
ln -s /usr/bin/c++filt /usr/bin/c++filt3 # missing on Darwin 7.0.1 x86
|
||||
# not necessary on OpenDarwin 7.2.1
|
||||
|
||||
and then configure gcc with:
|
||||
|
||||
mkdir build # create a sibling to the
|
||||
toplevel source
|
||||
dir
|
||||
# toplevel source dir
|
||||
cd build
|
||||
<dir>/gcc-X.X.X/configure --enable-languages=c,objc # don't try to build c++
|
||||
make bootstrap
|
||||
|
@ -189,7 +190,7 @@ configure and build as follows (tested using gcc-3.3.2 on Mac OS X 10.2 and
|
|||
mkdir build
|
||||
cd build
|
||||
<dir>/gcc-x.x.x/configure [ --prefix=<gcc install dir>] # by default gcc
|
||||
installs in /usr/local
|
||||
# installs in /usr/local
|
||||
make bootstrap
|
||||
make install
|
||||
cd <gcc install dir>/lib
|
||||
|
@ -212,15 +213,15 @@ else use [CC='<gcc install dir>/bin/gcc'] option when running configure.
|
|||
|
||||
then:
|
||||
|
||||
./configure --with-library-combo=gnu-gnu-gnu [--prefix=<GNUstep install dir>]
|
||||
./configure --with-library-combo=gnu-gnu-gnu [--prefix=<GNUstep install dir>] \
|
||||
[CC='<gcc install dir>/bin/gcc']
|
||||
|
||||
(apple-apple-apple is the default if you don't specify gnu-gnu-gnu). If you want
|
||||
to be able to compile for different targets/platforms together. Do this:
|
||||
|
||||
./configure --with-library-combo=gnu-gnu-gnu --disable-flattened
|
||||
--enable-multi-platform [--prefix=<GNUstep install dir>] [CC='<gcc install
|
||||
dir>/bin/gcc']
|
||||
./configure --with-library-combo=gnu-gnu-gnu --disable-flattened \
|
||||
--enable-multi-platform [--prefix=<GNUstep install dir>] \
|
||||
[CC='<gcc install dir>/bin/gcc']
|
||||
|
||||
Now:
|
||||
|
||||
|
@ -424,7 +425,7 @@ Other fonts are available on http://www.knuddel.org/Downloads/Fonts/
|
|||
Window Maker
|
||||
------------
|
||||
|
||||
Window Maker is the traditionnal window manager for GNUstep.
|
||||
Window Maker is the traditional window manager for GNUstep.
|
||||
|
||||
In the case, you choose to use it, don't forget to execute wmaker.inst else
|
||||
Window Maker will crash with signal 10.
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
# CVS_MODULE_NAME = base
|
||||
# CVS_FLAGS = -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gnustep
|
||||
#
|
||||
# CVS_TAG_NAME is the same as CVS_MODULE_NAME if not set and is used to
|
||||
# tag and retreive a module version
|
||||
#
|
||||
# You can also pass/override them on the command line if you want,
|
||||
# make cvs-snapshot CVS_FLAGS="-d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gnustep -z9"
|
||||
#
|
||||
|
@ -60,6 +63,9 @@
|
|||
ifeq ($(CVS_MODULE_NAME),)
|
||||
CVS_MODULE_NAME = $(PACKAGE_NAME)
|
||||
endif
|
||||
ifeq ($(CVS_TAG_NAME),)
|
||||
CVS_TAG_NAME = $(CVS_MODULE_NAME)
|
||||
endif
|
||||
|
||||
ifeq ($(CVS_FLAGS),)
|
||||
CVS_FLAGS = -z3
|
||||
|
@ -168,16 +174,16 @@ ifneq ($(RELEASE_DIR),)
|
|||
endif
|
||||
|
||||
#
|
||||
# Tag the CVS source with the $(CVS_MODULE_NAME)-$(VERTAG) tag
|
||||
# Tag the CVS source with the $(CVS_TAG_NAME)-$(VERTAG) tag
|
||||
#
|
||||
cvs-tag:
|
||||
$(CVS) $(CVS_FLAGS) rtag $(CVS_MODULE_NAME)-$(VERTAG) $(CVS_MODULE_NAME)
|
||||
$(CVS) $(CVS_FLAGS) rtag $(CVS_TAG_NAME)-$(VERTAG) $(CVS_MODULE_NAME)
|
||||
|
||||
#
|
||||
# Build a .tar.gz from the CVS sources using revision/tag
|
||||
# $(CVS_MODULE_NAME)-$(VERTAG)
|
||||
# $(CVS_TAG_NAME)-$(VERTAG)
|
||||
#
|
||||
cvs-dist: EXPORT_CVS_FLAGS = -r $(CVS_MODULE_NAME)-$(VERTAG)
|
||||
cvs-dist: EXPORT_CVS_FLAGS = -r $(CVS_TAG_NAME)-$(VERTAG)
|
||||
cvs-dist: internal-cvs-export
|
||||
|
||||
#
|
||||
|
|
|
@ -37,7 +37,6 @@ OPTFLAG = @CFLAGS@
|
|||
OBJCFLAGS= @OBJCFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPP = @CPP@
|
||||
CC_TYPE = @cc_type@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OEXT = .@OBJEXT@
|
||||
|
@ -92,6 +91,10 @@ INSTALL_DATA = @INSTALL_DATA@
|
|||
TAR = @TAR@
|
||||
MKDIRS = $(GNUSTEP_MAKEFILES)/mkinstalldirs
|
||||
|
||||
# Darwin specific flags
|
||||
CC_CPPPRECOMP = @cc_cppprecomp@
|
||||
CC_BUNDLE = @cc_bundle@
|
||||
|
||||
# The default library combination
|
||||
default_library_combo = @ac_cv_library_combo@
|
||||
|
||||
|
|
32
configure
vendored
32
configure
vendored
|
@ -317,7 +317,7 @@ ac_includes_default="\
|
|||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ac_cv_library_combo cc_type CYGWIN RANLIB AR DLLTOOL ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S TAR CHOWN GNUSTEP_ROOT root_prefix MAKEFILES_SUFFIX HOST_INSTALL GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT GNUSTEP_FLATTENED GNUSTEP_MULTI_PLATFORM BACKEND_BUNDLE EGREP objc_threaded ac_cv_objc_threaded USE_OBJC_EXCEPTIONS AUTO_DEPENDENCIES INCLUDES LIB_DIR OBJCFLAGS GNUSTEP_STRIP_MAKEFILES GNUSTEP_MOVE_OBSOLETE GNUSTEP_MAKE_VERSION GNUSTEP_MAKE_MAJOR_VERSION GNUSTEP_MAKE_MINOR_VERSION GNUSTEP_MAKE_SUBMINOR_VERSION clean_target_os clean_target_cpu clean_target_vendor LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ac_cv_library_combo cc_cppprecomp cc_bundle CYGWIN RANLIB AR DLLTOOL ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S TAR CHOWN GNUSTEP_ROOT root_prefix MAKEFILES_SUFFIX HOST_INSTALL GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT GNUSTEP_FLATTENED GNUSTEP_MULTI_PLATFORM BACKEND_BUNDLE EGREP objc_threaded ac_cv_objc_threaded USE_OBJC_EXCEPTIONS AUTO_DEPENDENCIES INCLUDES LIB_DIR OBJCFLAGS GNUSTEP_STRIP_MAKEFILES GNUSTEP_MOVE_OBSOLETE GNUSTEP_MAKE_VERSION GNUSTEP_MAKE_MAJOR_VERSION GNUSTEP_MAKE_MINOR_VERSION GNUSTEP_MAKE_SUBMINOR_VERSION clean_target_os clean_target_cpu clean_target_vendor LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -2551,18 +2551,27 @@ OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
|
|||
|
||||
#--------------------------------------------------------------------
|
||||
# Check if we are using Apple cc
|
||||
# FIXME: It would be nicer if there was a better way to test this.
|
||||
#--------------------------------------------------------------------
|
||||
echo "$as_me:$LINENO: checking if we are using the apple compiler" >&5
|
||||
echo $ECHO_N "checking if we are using the apple compiler... $ECHO_C" >&6
|
||||
gcc_cc_type=`${CC} --print-libgcc-file-name | grep -c "gcc-lib"`
|
||||
if test "$gcc_cc_type" = 1; then
|
||||
cc_type=gnu
|
||||
cc_cppprecomp=0
|
||||
cc_byndle=0
|
||||
echo "$as_me:$LINENO: checking for apple compiler flags" >&5
|
||||
echo $ECHO_N "checking for apple compiler flags... $ECHO_C" >&6
|
||||
cc_cppprecomp=`${CC} -no-cpp-precomp 2>&1 | grep -c "unrecognized"`
|
||||
cc_bundle=`${CC} -bundle 2>&1 | grep -c "couldn"`
|
||||
# 0 means we have the flag
|
||||
if test $cc_cppprecomp = 0; then
|
||||
cc_cppprecomp=yes
|
||||
else
|
||||
cc_type=apple
|
||||
cc_cppprecomp=no
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $cc_type" >&5
|
||||
echo "${ECHO_T}$cc_type" >&6
|
||||
if test $cc_bundle = 0; then
|
||||
cc_bundle=yes
|
||||
else
|
||||
cc_bundle=no
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: done" >&5
|
||||
echo "${ECHO_T}done" >&6
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -5400,7 +5409,8 @@ s,@target_cpu@,$target_cpu,;t t
|
|||
s,@target_vendor@,$target_vendor,;t t
|
||||
s,@target_os@,$target_os,;t t
|
||||
s,@ac_cv_library_combo@,$ac_cv_library_combo,;t t
|
||||
s,@cc_type@,$cc_type,;t t
|
||||
s,@cc_cppprecomp@,$cc_cppprecomp,;t t
|
||||
s,@cc_bundle@,$cc_bundle,;t t
|
||||
s,@CYGWIN@,$CYGWIN,;t t
|
||||
s,@RANLIB@,$RANLIB,;t t
|
||||
s,@AR@,$AR,;t t
|
||||
|
|
25
configure.ac
25
configure.ac
|
@ -62,17 +62,26 @@ OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
|
|||
|
||||
#--------------------------------------------------------------------
|
||||
# Check if we are using Apple cc
|
||||
# FIXME: It would be nicer if there was a better way to test this.
|
||||
#--------------------------------------------------------------------
|
||||
AC_MSG_CHECKING([if we are using the apple compiler])
|
||||
gcc_cc_type=`${CC} --print-libgcc-file-name | grep -c "gcc-lib"`
|
||||
if test "$gcc_cc_type" = 1; then
|
||||
cc_type=gnu
|
||||
cc_cppprecomp=0
|
||||
cc_byndle=0
|
||||
AC_MSG_CHECKING([for apple compiler flags])
|
||||
cc_cppprecomp=`${CC} -no-cpp-precomp 2>&1 | grep -c "unrecognized"`
|
||||
cc_bundle=`${CC} -bundle 2>&1 | grep -c "couldn"`
|
||||
# 0 means we have the flag
|
||||
if test $cc_cppprecomp = 0; then
|
||||
cc_cppprecomp=yes
|
||||
else
|
||||
cc_type=apple
|
||||
cc_cppprecomp=no
|
||||
fi
|
||||
AC_MSG_RESULT($cc_type)
|
||||
AC_SUBST(cc_type)
|
||||
if test $cc_bundle = 0; then
|
||||
cc_bundle=yes
|
||||
else
|
||||
cc_bundle=no
|
||||
fi
|
||||
AC_MSG_RESULT($cc_bundle)
|
||||
AC_SUBST(cc_cppprecomp)
|
||||
AC_SUBST(cc_bundle)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# specific target_os options
|
||||
|
|
10
target.make
10
target.make
|
@ -262,14 +262,6 @@ SHARED_LIBEXT = .dylib
|
|||
# The output of nm is slightly different on Darwin, it doesn't support -P
|
||||
EXTRACT_CLASS_NAMES_COMMAND = nm -g $$object_file | sed -n -e '/[^U] ___objc_class_name_/ {s/[0-9a-f]* [^U] ___objc_class_name_//p;}'
|
||||
|
||||
ifeq ($(CC_TYPE), apple)
|
||||
# Not sure why, but without -no-cpp-precomp, it doesn't compile
|
||||
# plain C files.
|
||||
INTERNAL_CFLAGS += -no-cpp-precomp
|
||||
|
||||
# TODO - Check if we can do without -no-cpp-precomp for Objective-C.
|
||||
INTERNAL_OBJCFLAGS += -no-cpp-precomp
|
||||
endif
|
||||
ifeq ($(FOUNDATION_LIB), apple)
|
||||
ifneq ($(arch),)
|
||||
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
|
||||
|
@ -292,7 +284,7 @@ DYLIB_DEF_FRAMEWORKS += -framework Foundation
|
|||
endif
|
||||
|
||||
|
||||
ifneq ($(CC_TYPE), apple)
|
||||
ifeq ($(CC_BUNDLE), no)
|
||||
# GNU compiler
|
||||
SHARED_LD_PREFLAGS += -noall_load -read_only_relocs warning \
|
||||
-flat_namespace -undefined warning
|
||||
|
|
Loading…
Reference in a new issue