Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238601 - binutils-apple patch-hosting bug
Summary: binutils-apple patch-hosting bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: All OS X
: Lowest enhancement
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-24 20:16 UTC by Elias Pipping
Modified: 2008-10-08 20:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild (odcctools-20080922.ebuild,5.90 KB, text/plain)
2008-09-24 20:16 UTC, Elias Pipping
Details
make it compile with FSF gcc (odcctools-20080922-gcc-fsf.patch,1.43 KB, patch)
2008-09-24 20:17 UTC, Elias Pipping
Details | Diff
don't install efi's manpages since we don't install efi (odcctools-20080922-no-efi-man.patch,785 bytes, patch)
2008-09-24 20:17 UTC, Elias Pipping
Details | Diff
don't create an OpenSource dir (odcctools-20080922-no-oss-dir.patch,622 bytes, patch)
2008-09-24 20:18 UTC, Elias Pipping
Details | Diff
fix an include for rebase (odcctools-20080922-rebase.patch,197 bytes, patch)
2008-09-24 20:19 UTC, Elias Pipping
Details | Diff
fix the test suite (odcctools-20080922-testsuite.patch,1.96 KB, patch)
2008-09-24 20:19 UTC, Elias Pipping
Details | Diff
remove some warnings (odcctools-20080922-warnings.patch,676 bytes, patch)
2008-09-24 20:20 UTC, Elias Pipping
Details | Diff
fix the test suite even more (mostly bsd/gnu incompatibilities) (odcctools-20080922-testsuite.patch,3.02 KB, patch)
2008-09-25 17:12 UTC, Elias Pipping
Details | Diff
new ebuild (odcctools-20080922.ebuild,6.25 KB, text/plain)
2008-09-25 17:12 UTC, Elias Pipping
Details
cleaned up patch to make it compile with FSF gcc (odcctools-20080922-gcc-fsf.patch,1.43 KB, patch)
2008-09-25 20:30 UTC, Elias Pipping
Details | Diff
cleaned up ebuild (odcctools-20080922.ebuild,5.49 KB, text/plain)
2008-09-25 20:31 UTC, Elias Pipping
Details
run ranlib before installation so we needn't touch permissions (odcctools-20080922-ranlib.patch,2.00 KB, patch)
2008-09-27 00:10 UTC, Elias Pipping
Details | Diff
don't create a symlink to nmedit from the dir nmedit is in (odcctools-20080922-nmedit.patch,547 bytes, patch)
2008-09-27 00:11 UTC, Elias Pipping
Details | Diff
don't install efi manpages if we don't want efi itself. cleaned up. (odcctools-20080922-no-efi-man.patch,1.24 KB, patch)
2008-09-27 00:12 UTC, Elias Pipping
Details | Diff
fix test suite a little more (odcctools-20080922-testsuite.patch,3.82 KB, patch)
2008-09-27 00:14 UTC, Elias Pipping
Details | Diff
no-efi patch without trailing whitespace (odcctools-20080922-no-efi-man.patch,1.24 KB, patch)
2008-09-27 00:24 UTC, Elias Pipping
Details | Diff
latest ebuild (odcctools-20080922.ebuild,4.87 KB, patch)
2008-09-27 19:57 UTC, Elias Pipping
Details | Diff
cctools diff (cctools.diff,19.41 KB, patch)
2008-09-27 20:07 UTC, Elias Pipping
Details | Diff
with this patch, the version string of ld64 is no longer broken (binutils-apple-ld64-vstring.diff,781 bytes, patch)
2008-09-27 21:55 UTC, Elias Pipping
Details | Diff
no longer build hppa, sparc, etc. assemblers (binutils-apple-as-archs.diff,3.94 KB, patch)
2008-09-27 22:59 UTC, Elias Pipping
Details | Diff
build as together with all the other tools again (binutils-apple-emake.diff,724 bytes, patch)
2008-09-27 23:14 UTC, Elias Pipping
Details | Diff
gets rid of libraries, includes, and obsolete manpages (binutils-apple-manpage-headers-libraries.diff,2.41 KB, patch)
2008-09-28 14:40 UTC, Elias Pipping
Details | Diff
missing patch to kill headers (20080922-no-headers.patch,350 bytes, patch)
2008-09-28 14:46 UTC, Elias Pipping
Details | Diff
handles the libexecdir for as and other fixes (binutils-apple-as-fixes.diff,4.14 KB, patch)
2008-09-28 17:42 UTC, Elias Pipping
Details | Diff
new diff (includes Makefile and fix for as-libexec-path) (binutils-apple-huge.patch,6.26 KB, patch)
2008-10-03 01:02 UTC, Elias Pipping
Details | Diff
even newer patch. replaces the ugly odcctools we-change-everything-permanently with a nice patch (i find) (binutils-apple-huge-new.patch,6.36 KB, patch)
2008-10-03 01:18 UTC, Elias Pipping
Details | Diff
patch to remove -fomit-frame-pointer (binutils-apple-frame-pointer.diff,566 bytes, patch)
2008-10-05 05:10 UTC, Elias Pipping
Details | Diff
new patch to handle -fomit-frame-pointer (binutils-apple-frame-pointer_new.diff,562 bytes, patch)
2008-10-06 22:51 UTC, Elias Pipping
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Pipping 2008-09-24 20:16:16 UTC
attaching patches to this
Comment 1 Elias Pipping 2008-09-24 20:16:57 UTC
Created attachment 166306 [details]
ebuild
Comment 2 Elias Pipping 2008-09-24 20:17:24 UTC
Created attachment 166308 [details, diff]
make it compile with FSF gcc
Comment 3 Elias Pipping 2008-09-24 20:17:46 UTC
Created attachment 166309 [details, diff]
don't install efi's manpages since we don't install efi
Comment 4 Elias Pipping 2008-09-24 20:18:14 UTC
Created attachment 166311 [details, diff]
don't create an OpenSource dir
Comment 5 Elias Pipping 2008-09-24 20:19:06 UTC
Created attachment 166312 [details, diff]
fix an include for rebase
Comment 6 Elias Pipping 2008-09-24 20:19:39 UTC
Created attachment 166314 [details, diff]
fix the test suite
Comment 7 Elias Pipping 2008-09-24 20:20:03 UTC
Created attachment 166315 [details, diff]
remove some warnings
Comment 8 Elias Pipping 2008-09-24 20:21:42 UTC
TODOs

 * An equivalent for driver.c.diff is still missing
 * ranlib needs to behave like ranlib even when called by another name
Comment 9 Elias Pipping 2008-09-24 20:28:49 UTC
TODO

 * make independent of apple's /usr/bin/make (e.g. by patching our make or providing apple-make)
Comment 10 Elias Pipping 2008-09-24 22:28:25 UTC
turns out, while the makefiles enable all of the NEXT features in make(1), via

  export USE_APPLE_PB_SUPPORT = all,

vpath is all that is require here, leaving us with

  export USE_APPLE_PB_SUPPORT = quiet vpath

(since we don't want a bunch of warnings). We might hence get away by applying
only some of the patches from

  http://www.opensource.apple.com/darwinsource/Current/gnumake-119/patches/
Comment 11 Elias Pipping 2008-09-25 17:12:22 UTC
Created attachment 166396 [details, diff]
fix the test suite even more (mostly bsd/gnu incompatibilities)
Comment 12 Elias Pipping 2008-09-25 17:12:47 UTC
Created attachment 166398 [details]
new ebuild
Comment 13 Elias Pipping 2008-09-25 18:38:11 UTC
These paths are searched by default (taken from dylib_table.c):

makestr(SYSTEM_LIBRARY,"/Frameworks/JavaVM.framework/Libraries/lib",name,".",versions[i],".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
makestr(SYSTEM_LIBRARY,"/PrivateFrameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
makestr(SYSTEM_LIBRARY,"Printers/",name,".",versions[i],".dylib",NULL)
makestr("/Local/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
makestr("/MacOSX/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
makestr("/AppleInternal/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
makestr("/lib/",name,".",versions[i],".dylib",NULL)
makestr("/usr/lib/",name,".",versions[i],".dylib",NULL)
makestr("/usr/lib/java/",name,".",versions[i],".dylib",NULL)
makestr("/usr/local/lib/",name,".",versions[i],".dylib",NULL)
makestr("/usr/canna/dylib/",name,".",versions[i],".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/CarbonCore.framework/Versions/",versions[i],"/Support/",name,".dylib",NULL)
makestr(SYSTEM_LIBRARY,"Frameworks/Carbon.framework/Versions/",versions[i],"/Libraries/",name,".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/CoreGraphics.framework/Versions/",versions[i],"/Libraries/",name,".",versions[i],".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Components/",name,".qtx",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/Carbon.framework/Versions/",versions[i],"/Resources//",name,".qtx",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/CoreGraphics.framework/Versions/",versions[i],"/Resources/",name,".",versions[i],".qtx",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/JavaVM.framework/Versions/1.2/Libraries/",name,".",versions[i],".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/PrintingCore.framework/Versions/",versions[i],"/Libraries/",name,".",versions[i],".dylib",NULL)
makestr(SYSTEM_LIBRARY,"/Frameworks/QuickTime.framework/Versions/",versions[i],"/",name,NULL)
Comment 14 Elias Pipping 2008-09-25 19:49:42 UTC
/usr/bin/md and /usr/bin/mig are called in the process.

Can we have our own copies of those? Maybe as a part of darwin-miscutils?
Comment 15 Fabian Groffen gentoo-dev 2008-09-25 19:53:26 UTC
what are md and mig?
Comment 16 Fabian Groffen gentoo-dev 2008-09-25 19:55:39 UTC
Removing cruft from here is dangerous as well as persuading...

(In reply to comment #13)
> These paths are searched by default (taken from dylib_table.c):
> 
> makestr(SYSTEM_LIBRARY,"/Frameworks/JavaVM.framework/Libraries/lib",name,".",versions[i],".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
> makestr(SYSTEM_LIBRARY,"/PrivateFrameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
> makestr(SYSTEM_LIBRARY,"Printers/",name,".",versions[i],".dylib",NULL)
> makestr("/Local/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
> makestr("/MacOSX/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
> makestr("/AppleInternal/Library/Frameworks/",name,".framework/Versions/",versions[i],"/",name,NULL)
> makestr("/lib/",name,".",versions[i],".dylib",NULL)
> makestr("/usr/lib/",name,".",versions[i],".dylib",NULL)
> makestr("/usr/lib/java/",name,".",versions[i],".dylib",NULL)
> makestr("/usr/local/lib/",name,".",versions[i],".dylib",NULL)
> makestr("/usr/canna/dylib/",name,".",versions[i],".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/CarbonCore.framework/Versions/",versions[i],"/Support/",name,".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"Frameworks/Carbon.framework/Versions/",versions[i],"/Libraries/",name,".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/CoreGraphics.framework/Versions/",versions[i],"/Libraries/",name,".",versions[i],".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Components/",name,".qtx",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/Carbon.framework/Versions/",versions[i],"/Resources//",name,".qtx",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/CoreGraphics.framework/Versions/",versions[i],"/Resources/",name,".",versions[i],".qtx",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/JavaVM.framework/Versions/1.2/Libraries/",name,".",versions[i],".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/PrintingCore.framework/Versions/",versions[i],"/Libraries/",name,".",versions[i],".dylib",NULL)
> makestr(SYSTEM_LIBRARY,"/Frameworks/QuickTime.framework/Versions/",versions[i],"/",name,NULL)


Let's just not mess with it, the linker isn't called that many times afterall...
Comment 17 Elias Pipping 2008-09-25 20:03:16 UTC
md is part of adv_cmds (APSL).
mig is a wrapper (mig.sh) around migcom from bootstrap_cmds (APSL).
Comment 18 Elias Pipping 2008-09-25 20:05:26 UTC
Well we do have to mess with it. While we might not want to remove paths (the only gain would be
speed), we do want to at our library paths from prefix, no? That keeps us from passing -L all day.
Comment 19 Fabian Groffen gentoo-dev 2008-09-25 20:07:27 UTC
No, because usually linking goes through gcc, which needs to know about it as well.  Technically, gcc does a bit to much, and it's just a pity it doesn't do the linking itself, sort of.
Comment 20 Elias Pipping 2008-09-25 20:30:23 UTC
Created attachment 166411 [details, diff]
cleaned up patch to make it compile with FSF gcc
Comment 21 Elias Pipping 2008-09-25 20:31:19 UTC
Created attachment 166413 [details]
cleaned up ebuild
Comment 22 Elias Pipping 2008-09-26 19:39:05 UTC
Comment on attachment 166411 [details, diff]
cleaned up patch to make it compile with FSF gcc

not supporting gcc-fsf any longer
Comment 23 Elias Pipping 2008-09-27 00:06:53 UTC
I'm doing something wrong with binutils-config, I think. Anyway, dropped a couple of patches,
cleaned up the others (addings conditonals that make sense instead of removing instructions).

Bootstrapping now works. Changes follow.
Comment 24 Elias Pipping 2008-09-27 00:08:16 UTC
Comment on attachment 166315 [details, diff]
remove some warnings

not fixing warnings (no gains, risky)
Comment 25 Elias Pipping 2008-09-27 00:10:33 UTC
Created attachment 166556 [details, diff]
run ranlib before installation so we needn't touch permissions
Comment 26 Elias Pipping 2008-09-27 00:11:44 UTC
Created attachment 166558 [details, diff]
don't create a symlink to nmedit from the dir nmedit is in
Comment 27 Elias Pipping 2008-09-27 00:12:42 UTC
Created attachment 166559 [details, diff]
don't install efi manpages if we don't want efi itself. cleaned up.
Comment 28 Elias Pipping 2008-09-27 00:14:37 UTC
Created attachment 166560 [details, diff]
fix test suite a little more
Comment 29 Elias Pipping 2008-09-27 00:24:45 UTC
Created attachment 166562 [details, diff]
no-efi patch without trailing whitespace
Comment 30 Elias Pipping 2008-09-27 16:05:57 UTC
these are the files that are currently installed

pipping@quicksand $ find .
.
./etc
./etc/env.d
./etc/env.d/binutils
./etc/env.d/binutils/i686-apple-darwin9-20080922
./usr
./usr/i686-apple-darwin9
./usr/i686-apple-darwin9/binutils-bin
./usr/i686-apple-darwin9/binutils-bin/20080922
./usr/i686-apple-darwin9/binutils-bin/20080922/ar
./usr/i686-apple-darwin9/binutils-bin/20080922/as
./usr/i686-apple-darwin9/binutils-bin/20080922/check_dylib
./usr/i686-apple-darwin9/binutils-bin/20080922/checksyms
./usr/i686-apple-darwin9/binutils-bin/20080922/cmpdylib
./usr/i686-apple-darwin9/binutils-bin/20080922/cmpshlib
./usr/i686-apple-darwin9/binutils-bin/20080922/codesign_allocate
./usr/i686-apple-darwin9/binutils-bin/20080922/gprof
./usr/i686-apple-darwin9/binutils-bin/20080922/hack_libgcc
./usr/i686-apple-darwin9/binutils-bin/20080922/indr
./usr/i686-apple-darwin9/binutils-bin/20080922/install_name_tool
./usr/i686-apple-darwin9/binutils-bin/20080922/kern_tool
./usr/i686-apple-darwin9/binutils-bin/20080922/ld
./usr/i686-apple-darwin9/binutils-bin/20080922/ld64
./usr/i686-apple-darwin9/binutils-bin/20080922/libtool
./usr/i686-apple-darwin9/binutils-bin/20080922/lipo
./usr/i686-apple-darwin9/binutils-bin/20080922/mkshlib
./usr/i686-apple-darwin9/binutils-bin/20080922/nm
./usr/i686-apple-darwin9/binutils-bin/20080922/nmedit
./usr/i686-apple-darwin9/binutils-bin/20080922/otool
./usr/i686-apple-darwin9/binutils-bin/20080922/pagestuff
./usr/i686-apple-darwin9/binutils-bin/20080922/ranlib
./usr/i686-apple-darwin9/binutils-bin/20080922/rebase
./usr/i686-apple-darwin9/binutils-bin/20080922/redo_prebinding
./usr/i686-apple-darwin9/binutils-bin/20080922/seg_addr_table
./usr/i686-apple-darwin9/binutils-bin/20080922/seg_hack
./usr/i686-apple-darwin9/binutils-bin/20080922/segedit
./usr/i686-apple-darwin9/binutils-bin/20080922/size
./usr/i686-apple-darwin9/binutils-bin/20080922/strings
./usr/i686-apple-darwin9/binutils-bin/20080922/strip
./usr/i686-apple-darwin9/binutils-bin/libexec
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/i386
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/i386/as
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/ppc
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/ppc/as
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/ppc64
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/ppc64/as
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/x86_64
./usr/i686-apple-darwin9/binutils-bin/libexec/gcc/darwin/x86_64/as
./usr/lib
./usr/lib/binutils
./usr/lib/binutils/i686-apple-darwin9
./usr/lib/binutils/i686-apple-darwin9/20080922
./usr/lib/binutils/i686-apple-darwin9/20080922/gprof.callg
./usr/lib/binutils/i686-apple-darwin9/20080922/gprof.flat
./usr/lib/binutils/i686-apple-darwin9/20080922/hppa
./usr/lib/binutils/i686-apple-darwin9/20080922/hppa/as
./usr/lib/binutils/i686-apple-darwin9/20080922/i860
./usr/lib/binutils/i686-apple-darwin9/20080922/i860/as
./usr/lib/binutils/i686-apple-darwin9/20080922/include
./usr/lib/binutils/i686-apple-darwin9/20080922/include/cbt
./usr/lib/binutils/i686-apple-darwin9/20080922/include/cbt/libsyminfo.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/dyld
./usr/lib/binutils/i686-apple-darwin9/20080922/include/dyld/bool.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/arch.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/arm
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/arm/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/fat.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/getsect.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/hppa
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/hppa/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/hppa/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/i386
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/i386/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/i860
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/i860/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/i860/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/kld.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/ldsyms.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/loader.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/m68k
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/m68k/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/m88k
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/m88k/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/m88k/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/nlist.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/ppc
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/ppc/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/ppc/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/ranlib.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/redo_prebinding.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/rld.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/rld_state.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/sarld.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/sparc
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/sparc/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/sparc/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/stab.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/swap.h
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/x86_64
./usr/lib/binutils/i686-apple-darwin9/20080922/include/mach-o/x86_64/reloc.h
./usr/lib/binutils/i686-apple-darwin9/20080922/libmacho.a
./usr/lib/binutils/i686-apple-darwin9/20080922/libmacho_debug.a
./usr/lib/binutils/i686-apple-darwin9/20080922/libmacho_profile.a
./usr/lib/binutils/i686-apple-darwin9/20080922/libmacho_static.a
./usr/lib/binutils/i686-apple-darwin9/20080922/libredo_prebinding.a
./usr/lib/binutils/i686-apple-darwin9/20080922/libsyminfo.a
./usr/lib/binutils/i686-apple-darwin9/20080922/m68k
./usr/lib/binutils/i686-apple-darwin9/20080922/m68k/as
./usr/lib/binutils/i686-apple-darwin9/20080922/m88k
./usr/lib/binutils/i686-apple-darwin9/20080922/m88k/as
./usr/lib/binutils/i686-apple-darwin9/20080922/sparc
./usr/lib/binutils/i686-apple-darwin9/20080922/sparc/as
./usr/share
./usr/share/binutils-data
./usr/share/binutils-data/i686-apple-darwin9
./usr/share/binutils-data/i686-apple-darwin9/20080922
./usr/share/binutils-data/i686-apple-darwin9/20080922/man
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/ar.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/as.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/check_dylib.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/checksyms.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/cmpdylib.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/cmpshlib.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/codesign_allocate.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/dylibprof.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/gprof.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/indr.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/install_name_tool.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/ld_classic.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/libtool.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/lipo.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/mkshlib.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/nm.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/nmedit.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/otool.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/pagestuff.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/ranlib.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/redo_prebinding.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/seg_addr_table.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/segedit.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/size.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/strings.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man1/strip.1.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/arch.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/end.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/get_end.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/getsectbyname.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/getsectbynamefromheader.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/getsectdata.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/getsectdatafromheader.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/getsegbyname.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/kld.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/libsyminfo.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man3/redo_prebinding.3.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5/Mach-O.5.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5/a.out.5.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5/ar.5.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5/ranlib.5.bz2
./usr/share/binutils-data/i686-apple-darwin9/20080922/man/man5/stab.5.bz2
./usr/share/man
./usr/share/man/man1
./usr/share/man/man1/ld.1.bz2
./usr/share/man/man1/ld64.1.bz2
./usr/share/man/man1/rebase.1.bz2
pipping@quicksand $ 
Comment 31 Elias Pipping 2008-09-27 16:11:22 UTC
regarding that list of files,

 * the ld_classic manpage shouldn't be installed (because we don't install ld_classic)
 * all the manpages should go into the same directory (hence {ld{,64},rebase} should go into a slotted dir)
 * we might not want to install the hppa, sparc, w/e assembler
 * we might not want to install the includes
 * the libexec/gcc/darwin should be part of the slotting (no idea how to do that with binutils-config), see also: ebuild note about LIBDIR
 * do we need the libraries (libmacho, ...)
Comment 32 Elias Pipping 2008-09-27 19:57:14 UTC
Created attachment 166631 [details, diff]
latest ebuild
Comment 33 Elias Pipping 2008-09-27 19:57:35 UTC
Comment on attachment 166413 [details]
cleaned up ebuild

forgot to obsolete this one
Comment 34 Elias Pipping 2008-09-27 20:07:30 UTC
Created attachment 166633 [details, diff]
cctools diff

all these attachments only cause confusion. attaching a diff against the directory that combines them all.
Comment 35 Fabian Groffen gentoo-dev 2008-09-27 20:52:35 UTC
initial version added to the tree as sys-devel/binutils-apple
Comment 36 Elias Pipping 2008-09-27 21:53:29 UTC
Comment on attachment 166633 [details, diff]
cctools diff

binutils-apple is live now, so this patch is obsolete
Comment 37 Elias Pipping 2008-09-27 21:55:49 UTC
Created attachment 166640 [details, diff]
with this patch, the version string of ld64 is no longer broken
Comment 38 Elias Pipping 2008-09-27 21:58:56 UTC
(In reply to comment #31)
>  * all the manpages should go into the same directory (hence {ld{,64},rebase}
> should go into a slotted dir)

that's fixed by now,

(In reply to comment #9)
>  * make independent of apple's /usr/bin/make (e.g. by patching our make or
> providing apple-make)

that's been taken care of by separating 'as' from the rest and calling 'emake -k; emake'.
Comment 39 Elias Pipping 2008-09-27 22:59:14 UTC
Created attachment 166642 [details, diff]
no longer build hppa, sparc, etc. assemblers
Comment 40 Elias Pipping 2008-09-27 23:13:18 UTC
I must be going nuts.

I couldn't reproduce the problem in as/ anymore.

I replaced the calls to emake with calls to make and they came back.

So my next thought was that emake didn't respect EPREFIX and called /usr/bin/make directly

But that's not the case either. putting 'which make' into $EPREFIX/usr/lib/portage/bin/emake yields
the correct path, running `MAKE=$EPREFIX/usr/bin/make emake` instead of emake doesn't yield any
errors either.

Any ideas?
Comment 41 Elias Pipping 2008-09-27 23:14:57 UTC
Created attachment 166644 [details, diff]
build as together with all the other tools again

see also comment #40

does this *not* work for anyone out there?
Comment 42 Fabian Groffen gentoo-dev 2008-09-28 07:41:27 UTC
Could it be a -jX issue?  emake in general inserts that.  Does it still work with -j1 forced?

I applied the other two patches for now, thanks
Comment 43 Elias Pipping 2008-09-28 10:40:14 UTC
Comment on attachment 166644 [details, diff]
build as together with all the other tools again

indeed, that was it.
Comment 44 Fabian Groffen gentoo-dev 2008-09-28 10:44:23 UTC
ok, so we actually have to fix it somehow once...
Comment 45 Elias Pipping 2008-09-28 14:40:54 UTC
Created attachment 166681 [details, diff]
gets rid of libraries, includes, and obsolete manpages
Comment 46 Elias Pipping 2008-09-28 14:46:04 UTC
Created attachment 166683 [details, diff]
missing patch to kill headers
Comment 47 Elias Pipping 2008-09-28 15:00:26 UTC
Comment on attachment 166642 [details, diff]
no longer build hppa, sparc, etc. assemblers

(In reply to comment #31)
>  * we might not want to install the hppa, sparc, w/e assembler

fixed
Comment 48 Elias Pipping 2008-09-28 15:00:46 UTC
Comment on attachment 166681 [details, diff]
gets rid of libraries, includes, and obsolete manpages

(In reply to comment #31)
>  * the ld_classic manpage shouldn't be installed (because we don't install
> ld_classic)
>  * we might not want to install the includes
>  * do we need the libraries (libmacho, ...)

fixed
Comment 49 Elias Pipping 2008-09-28 15:11:02 UTC
== Summary ==

of the TODOs and considerations, what remains is

 * the libexec/gcc/darwin should be part of the slotting (no idea how to do
that with binutils-config), see also: ebuild note about LIBDIR
 * An equivalent for driver.c.diff is still missing

Those are actually the same issue (see driver.c.diff or something in odcctools)
Comment 50 Elias Pipping 2008-09-28 17:42:39 UTC
Created attachment 166699 [details, diff]
handles the libexecdir for as and other fixes

Adopting the driver.c patch from odcctools. As a result everything is now slotted.

moved some variables around make calls.

We're no longer building anything that requires MACOSX_DEPLOYMENT_TARGET to be set.

Two problems remain:
 * calling `emake; emake -k` for as is ugly. It requires duplication, too. Any ideas?
 * The driver.c patch is ugly and destructive. It should be cleaned up and conditionalized

On a sidenote, replacing the directory structure for as is not an option. The 'as' driver handles
command line options and the like as well.
Comment 51 Elias Pipping 2008-10-03 01:02:30 UTC
Created attachment 167037 [details, diff]
new diff (includes Makefile and fix for as-libexec-path)

takes care of all the problems there are. adds a makefile to clean up the ebuild.
still suffers from using the ugly odcctools patch for as. works perfectly.

as a result of using make, we now split up tasks, allowing for ccache and MAKEOPTS
to speed up compilation. the makefile is clean and easier to maintain than the calls
to echo_and_run (which was in turn removed)
Comment 52 Elias Pipping 2008-10-03 01:18:09 UTC
Created attachment 167038 [details, diff]
even newer patch. replaces the ugly odcctools we-change-everything-permanently with a nice patch (i find)
Comment 53 Fabian Groffen gentoo-dev 2008-10-03 17:34:06 UTC
applied, thankz
Comment 54 Elias Pipping 2008-10-05 04:55:15 UTC
Comment on attachment 167038 [details, diff]
even newer patch. replaces the ugly odcctools we-change-everything-permanently with a nice patch (i find)

obsolete since it's been applied
Comment 55 Elias Pipping 2008-10-05 05:10:36 UTC
Created attachment 167247 [details, diff]
patch to remove -fomit-frame-pointer

-pg is used in the makefiles (didn't take a look), which clashes with -fomit-frame-pointer

filter-flags would be overkill since it appears to run fine with -O3 -fomit-frame-pointer -pipe -march=core2.

Should we patch out -pg instead?
Comment 56 Elias Pipping 2008-10-05 06:43:18 UTC
Before binutils-apple is let lose, we might want to pick a sane version number.

ld64-85.2.2 and cctools-698 are part of Xcode 3.1.1. Since we can only have one version number,
I suggest goes with 3.1.1.

The file cctools-698/RelNotes/Private_CompilerTools.html also shows an internal versioning.
Comment 57 Elias Pipping 2008-10-05 06:43:48 UTC
s/goes/going/
Comment 58 Elias Pipping 2008-10-06 22:51:31 UTC
Created attachment 167497 [details, diff]
new patch to handle -fomit-frame-pointer

uses filter-flags
Comment 59 Fabian Groffen gentoo-dev 2008-10-07 19:07:41 UTC
added
Comment 60 Elias Pipping 2008-10-07 22:47:00 UTC
Comment on attachment 167497 [details, diff]
new patch to handle -fomit-frame-pointer

obsoleting what's been committed
Comment 61 Elias Pipping 2008-10-07 22:50:23 UTC
`tc-export CC CXX` is something we might want to add somewhere

for one, in case x64-macos is ever taken another swing at again, having CC='gcc -m64' work for bootstrapping would be nice. Currently, cctools and ld64 both use the 'cc' and 'g++' binaries. Hence, having it for src_compile() would be nice

if we were to have it for src_test() as well, we could remove the explicit CC=... CXX=...

However, if someone where to build it via 'ebuild ... compile; ebuild ... test', setting it in src_compile() wouldn't work for the second part. Hence we'd need to move it up a level -- to global scope, i suppose.
Comment 62 Elias Pipping 2008-10-07 22:55:12 UTC
Now that we've decided on going with 3.1.1 as a version, could someone please

  $ for i in {,files/}*20080922*; do svn mv $i ${i/20080922/3.1.1}; done

from within sys-devel/binutils-apple ?

Also, should files/${PV}-....patch not be files/${P}-....patch?
Comment 63 Fabian Groffen gentoo-dev 2008-10-08 20:05:05 UTC
done, I consider the bug fixed now.