--- /dev/null
+--- gcc_42-5566/gcc/config/darwin-crt3.c.orig 2009-02-15 20:08:45.000000000 +0000
++++ gcc_42-5566/gcc/config/darwin-crt3.c 2009-02-15 20:16:16.000000000 +0000
+@@ -37,7 +37,17 @@
+ #include "tconfig.h"
+ #include "tsystem.h"
+
++/* RWMJ: The headers we use for cross-compilation don't have <dlfcn.h>
++ * even though this file exists on real Macs. Hack around this for
++ * now.
++ */
++#if 0
+ #include <dlfcn.h>
++#else
++extern void *dlopen(const char *, int);
++#define RTLD_NOLOAD 0x10
++#endif
++
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <string.h>
URL: http://www.opensource.apple.com/darwinsource/
Source0: http://www.opensource.apple.com/darwinsource/tarballs/other/gcc_%{gcc_major}%{gcc_minor}-%{apple_build}.tar.gz
+Patch0: darwinx-gcc-42-dlfcn.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%prep
%setup -q -n gcc_%{gcc_major}%{gcc_minor}-%{apple_build}
+%patch0 -p1
+
%build
languages="c,c++,objc,obj-c++"
for arch in powerpc i386; do
- mkdir build-${arch}
- pushd build-${arch}
+ mkdir build-$arch
+ pushd build-$arch
CC="%{__cc} ${RPM_OPT_FLAGS}" \
../configure \
--infodir=%{_infodir} \
--datadir=%{_datadir} \
--build=%_build --host=%_host \
- --target=${arch}-apple-darwin8 \
+ --target=$arch-apple-darwin8 \
--verbose \
--without-newlib \
--disable-multilib \
# --with-sysroot=%{_prefix}/$arch-apple-darwin8
+# make %{?_smp_mflags} configure-host maybe-all-gcc
+# pushd gcc
+# make cc1objplus
+# popd
make %{?_smp_mflags}
popd
done
-exit 1
-
%install
rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
-# Remove static libraries but DON'T remove *.dll.a files.
-rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
+# This is crap ... Should just do 'make install'.
+for arch in powerpc i386; do
+ for d in libiberty gcc; do
+ pushd build-$arch/$d
+ #mkdir -p $RPM_BUILD_ROOT%{_libdir}/gcc/$arch-apple-darwin8/%{version}/install-tools/include
+ make install DESTDIR=$RPM_BUILD_ROOT
+ popd
+ done
+done
%clean
%changelog
-* Fri Jan 23 2009 Your Name <you@example.com> - 1.2.3-1
+* Sun Feb 15 2009 Richard W.M. Jones <rjones@redhat.com> - 4.2-0.5566.1
- Initial RPM release.
+
+* Mon Jan 08 2007 Benjamin Reed <rangerrick@befunk.com> - 1:4.0.1-5363.1
+- updated to xcode 2.4 GCC
+
+* Tue Mar 28 2006 Benjamin Reed <rangerrick@befunk.com> - 1:4.0.1-5250.1
+- initial release as a per-version package