View previous topic :: View next topic |
Author |
Message |
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Thu Jun 29, 2006 6:59 am Post subject: -hashvals && -zdynsort alternative (-Wl,--hash-styl |
|
|
As always in Unsupported Software - you must know that this packages, ebuilds and essentially all the stuff posted here is
NOT SUPPORTED FROM THE GENTOO DEVELOPERS AND DO NOT POST BUGS RELATED TO IT ON B.G.O
This guide is more or less obsolete - please use the wiki
If you have problems or support questions, you could always ask here in this thread (one more time please do not file bugs on B.G.O.).
So this is for now, have fun _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack
Last edited by Gergan Penkov on Fri Jul 07, 2006 11:23 am; edited 13 times in total |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Thu Jun 29, 2006 3:26 pm Post subject: Re: new -Bdirect alternative from red hat (DT_GNU_HASH) |
|
|
That is very interesting.
Code: | binutils-2.17.50.0.2-hash-style.patch
glibc-gnu-hash.patch
prelink-gnu-hash.patch
glibc-gnu-hash-hack.patch |
That should be too hard to set in an ebuild. Tonight when I get a chance, I'll test this out..
Afterwards LDFLAGS will looked like this I assume.
Code: | LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=both" |
_________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Thu Jun 29, 2006 3:30 pm Post subject: |
|
|
Will your ebuild include the other binutils patches (--dynsort, and --hashvals)? _________________ Nihilism makes me smile. |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Thu Jun 29, 2006 3:52 pm Post subject: |
|
|
In fact it is incompatible with hashvals or moreover this is what probably what will be included in binutils and glibc instead of hashval, I'm building now the system (already emerged binutils and glibc). I don't know if dynsort and bdirect could be used with this
Some diffs if one wants to try this before vipernicus posts builds:
diff -Nua /usr/portage/sys-devel/binutils/binutils-2.17.50.0.2.ebuild /usr/local/overlays/portage/sys-devel/binutils/binutils-2.17.50.0.2.ebuild
Code: | --- /usr/portage/sys-devel/binutils/binutils-2.17.50.0.2.ebuild 2006-06-17 23:37:00.000000000 +0200
+++ /usr/local/overlays/portage/sys-devel/binutils/binutils-2.17.50.0.2.ebuild 2006-06-29 13:07:07.000000000 +0200
@@ -9,3 +9,10 @@
# ARCH - packages to test before marking
KEYWORDS="-*"
+src_unpack() {
+ tc-binutils_unpack
+ tc-binutils_apply_patches
+ epatch "${FILESDIR}/binutils-2.17.50.0.2-hash-style.patch"
+
+}
+
|
and
diff -Nua /usr/portage/sys-libs/glibc/glibc-2.4-r3.ebuild /usr/local/overlays/portage/sys-libs/glibc/glibc-2.4-r3.ebuild
Code: | --- /usr/portage/sys-libs/glibc/glibc-2.4-r3.ebuild 2006-06-28 07:11:15.000000000 +0200
+++ /usr/local/overlays/portage/sys-libs/glibc/glibc-2.4-r3.ebuild 2006-06-29 14:14:11.000000000 +0200
@@ -44,7 +44,7 @@
GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
+inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib autotools
DESCRIPTION="GNU libc6 (also called glibc2) C library"
HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
@@ -76,7 +76,7 @@
BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
+NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.16"}
LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
### SRC_URI ###
@@ -220,6 +220,8 @@
unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
fi
+ GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} \
+ 6910_all_glibc-suse-hashvals.patch"
if [[ -n ${PATCH_VER} ]] ; then
cd "${S}"
EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
@@ -228,7 +230,9 @@
ARCH=$(tc-arch) \
epatch "${WORKDIR}"/patches
fi
-
+ epatch "${FILESDIR}/glibc-gnu-hash.patch"
+ epatch "${FILESDIR}/glibc-gnu-hash-hack.patch"
+ eautoconf
gnuconfig_update
}
@@ -1098,7 +1102,7 @@
setup_env
toolchain-glibc_src_unpack
-
+
# Backwards SSP support
cd "${S}"
# For now, we force everyone to have the extra symbols
|
for glibc either use linux-headers-2.16.6 or change the line back to what it was.
I'll post later if I have some results
This patches also the hack in which could then be used to test the differences
and this are the LD_FLAGS I use
cat /etc/make.conf |grep LD
Code: |
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both"
|
_________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Thu Jun 29, 2006 6:02 pm Post subject: |
|
|
I don't know much about ebuilds. I should read up on them someday. I didn't know you can do a PATCH_EXCLUDE.
I can probably fix nxsty's ebuild to work with this, and the 1.16 patches, and just exclude the one that breaks. I'll try making an ebuild for the latest 2.4.90.20060626 snapshot, throwing in nxsty's patches and these and see if it builds. I'll report back in a bit. _________________ Nihilism makes me smile. |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Thu Jun 29, 2006 6:07 pm Post subject: |
|
|
Aside from the trivial including of the patches, for glibc you need to exclude the suse-hashvals and eautoconf to recreate configure (this is important, or else you will not build the glibc with the --hash-style flag). Other than that all is well I am in the middle of emerge -e system for now. _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Thu Jun 29, 2006 7:33 pm Post subject: |
|
|
Gergan Penkov wrote: | Aside from the trivial including of the patches, for glibc you need to exclude the suse-hashvals and eautoconf to recreate configure (this is important, or else you will not build the glibc with the --hash-style flag). Other than that all is well I am in the middle of emerge -e system for now. |
Why continue to use -Bdirect if there is now a better hacked prelink for dlopen()? _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Thu Jun 29, 2006 7:42 pm Post subject: |
|
|
With some small edits you can get nxsty's ebuild to work.
Edit: nesl247 should be posting an updated ebuild! _________________ Nihilism makes me smile.
Last edited by enderandrew on Sat Jul 01, 2006 6:10 am; edited 1 time in total |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Thu Jun 29, 2006 8:10 pm Post subject: |
|
|
If anyone can recommend a good command-line ftp program I can emerge, then I will upload my various ebuilds, patches, etc. into an overlay that other people can check out.
Mainly they are other people's overlays, but I've updated and modified them. So I'm not really taking credit for them. _________________ Nihilism makes me smile. |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Thu Jun 29, 2006 9:13 pm Post subject: |
|
|
enderandrew wrote: | If anyone can recommend a good command-line ftp program I can emerge, then I will upload my various ebuilds, patches, etc. into an overlay that other people can check out.
Mainly they are other people's overlays, but I've updated and modified them. So I'm not really taking credit for them. |
gftp without gtk is commandline i believe. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
OddFox Apprentice
Joined: 28 Nov 2002 Posts: 270 Location: Spokane, WA
|
Posted: Thu Jun 29, 2006 10:14 pm Post subject: |
|
|
Out of curiosity is there any reason why I should take my system that's been compiled twice-over with -Bdirect, -hashvals and -zdynsort and transfer it over to this method? It seems like it achieves pretty much the same objective? I don't really fancy doing a whole system recompile for the same thing I have right now, only different, though I do like the idea here. _________________ Now the rainy season reminds me of Maria
The way she danced, the color of her hair
Now I'm locked inside a stall at the cantina
Eating the bananas and the cocaine off the mirror
Looking for a ticket to take me away from here |
|
Back to top |
|
|
vipernicus Veteran
Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
Posted: Fri Jun 30, 2006 12:45 am Post subject: |
|
|
OddFox wrote: | Out of curiosity is there any reason why I should take my system that's been compiled twice-over with -Bdirect, -hashvals and -zdynsort and transfer it over to this method? It seems like it achieves pretty much the same objective? I don't really fancy doing a whole system recompile for the same thing I have right now, only different, though I do like the idea here. |
I guess it depends if you can handle a compile in the background, or if you want to do some testing. Me, I'm a compulsive compiler. _________________ Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Fri Jun 30, 2006 1:48 am Post subject: |
|
|
Quote: | Out of curiosity is there any reason why I should take my system that's been compiled twice-over with -Bdirect, -hashvals and -zdynsort and transfer it over to this method? |
Most probably binutils will include this patch in the mainline as if you look at the comments in the thread - they are all positive, and even now the last post from Michael Meeks http://sourceware.org/ml/binutils/2006-06/msg00435.html shows that probably this will be the way:
Quote: | Hi Jakub,
On Wed, 2006-06-28 at 19:09 +0200, Jakub Jelinek wrote:
> The following patches introduce an optional ELF hash section
Dudie; you rock ! - thanks for taking this on board; this is really
nice and here was I thinking I was going to have to write a length
paper to try to convince Ulrich You made my month (really). |
So decide yourself. _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Fri Jun 30, 2006 2:17 am Post subject: |
|
|
By the way, I didn't get the old -dynsort patch to work with this and 2.17.50.0.2 - I was told you needed new patches to work with 2.17.50.0.2 in generall. On dev.gentoo.org/~anarchy you'll find a new patch for 2.17.50.0.2 that works on its own, but the patch adds in dynsort hashvals and Bdirect all at once. Is there a patch for dynsort by itself that will work on 2.17.50.0.2 that anyone knows of?
I'm going to recompile binutils yet again when I get home. When I compiled it this morning with this patch, I forgot to include the patch that fixes compiling the kernel with 2.17.50.0.2 _________________ Nihilism makes me smile. |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Fri Jun 30, 2006 2:21 am Post subject: |
|
|
Read the post from Michael Meeks - I don't think it will work just now, moreover he says that this patch seems to replace -hashvals + -zdynsort _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Fri Jun 30, 2006 2:24 am Post subject: |
|
|
I thought it more replaced hashvals and Bdirect and might work with dynsort. _________________ Nihilism makes me smile. |
|
Back to top |
|
|
nesl247 Veteran
Joined: 15 Jun 2004 Posts: 1614 Location: Florida
|
Posted: Fri Jun 30, 2006 3:57 am Post subject: |
|
|
As soon as I test out my overlay (based off of vipernicus' ebuilds - mine just use portage variables instead of hard coding them, and I use nxsty's glibc) I'll upload two tarballs. One with nxsty's glibc modified to be updated (his 2.4-r3, and 2.4-r4), and one with the portage version. |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Fri Jun 30, 2006 4:14 am Post subject: |
|
|
Fine , just post the links or pm them, I'll update the topic and the first post.
On a side note from emerge -e system around 200 pkg are ready still less than 100 to go. I had two problems for now, but haven't got the time to look at them - postgresql configure died in rather strange way and mit-krb5 on compile (although these could be just ebuild problems and not directly connected with the patch). I haven't tested as of yet as does not make sense, but just tried the valgrind thing on grep and python and it shows improvements in the misses. _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
nesl247 Veteran
Joined: 15 Jun 2004 Posts: 1614 Location: Florida
|
Posted: Fri Jun 30, 2006 4:16 am Post subject: |
|
|
Will do. I've unfortunately got around 600 something packages installed.. I have no idea why.. I guess it's just built up deps. Hopefully ecatmurs script will be available soon again so I can get the version that works with portage-2.1.1_preX. |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Fri Jun 30, 2006 4:54 am Post subject: |
|
|
nesl247 wrote: | As soon as I test out my overlay (based off of vipernicus' ebuilds - mine just use portage variables instead of hard coding them, and I use nxsty's glibc) I'll upload two tarballs. One with nxsty's glibc modified to be updated (his 2.4-r3, and 2.4-r4), and one with the portage version. |
The ebuild I posted above actually uses nxsty's glibc patches, and the patch from this thread. It builds the latest snapshot of glibc (2.4.90.20060626) as of a few days ago. _________________ Nihilism makes me smile. |
|
Back to top |
|
|
nesl247 Veteran
Joined: 15 Jun 2004 Posts: 1614 Location: Florida
|
Posted: Fri Jun 30, 2006 4:57 am Post subject: |
|
|
Oh ok.. Well then I'll just get vipernicus to post his link to his stuff. |
|
Back to top |
|
|
nesl247 Veteran
Joined: 15 Jun 2004 Posts: 1614 Location: Florida
|
Posted: Fri Jun 30, 2006 5:12 am Post subject: |
|
|
enderandrew, does your ebuild work? Mine is almost the same (minor differences), but for some reason glibc fails to compile due to a unset variable SUSE_DIRECT or some sort like that.. |
|
Back to top |
|
|
enderandrew l33t
Joined: 25 Oct 2005 Posts: 731
|
Posted: Fri Jun 30, 2006 5:52 am Post subject: |
|
|
Perhaps not. I'm at work. I threw it together quickly on my way out the door this morning. If you have a suggestion to fix it, or see a problem, please let me know so I can correct it.
I hope it isn't broken, because when I left for work, I made a quick script to rebuild the toolchain, switch to the new gcc and binutils I was building, rebuild the toolchain again, and then rebuild the world. I'll be quite sad if it failed before it got to rebuild anything.
Edit: As per Gergan Penkov's instructions in this thread, we are excluding 6910_all_glibc-suse-hashvals.patch
Are you excluding that patch in your ebuild? I'm guessing adding hashvals would conflict with the patches in this thread, so I can understand why it is being excluded. But perhaps another patch is looking for that information. _________________ Nihilism makes me smile. |
|
Back to top |
|
|
pussi l33t
Joined: 08 May 2004 Posts: 727 Location: Finland
|
Posted: Fri Jun 30, 2006 6:16 am Post subject: |
|
|
Did I understand correctly that unlike -Bdirect, this would require prelinking again? |
|
Back to top |
|
|
Gergan Penkov Veteran
Joined: 17 Jul 2004 Posts: 1464 Location: das kleinste Kuhdorf Deutschlands :)
|
Posted: Fri Jun 30, 2006 6:56 am Post subject: |
|
|
Well I have changed the topic name to much more appropriate name, as it was, was incorrect
Quote: | Did I understand correctly that unlike -Bdirect, this would require prelinking again? |
well yes, but I think that -Bdirect could be changed to be used on top of this or this is how I see the discussion on the mailing list.
probably this patch will be officially included (well Jakub Jelinek and Ulrich Drepper are from red hat, and ulrich has rejected the Michael Meeks patches) so the end effect will be that this comes in binutils and glibc (and suse patches their with -Bdirect) or this is how I see it _________________ "I knew when an angel whispered into my ear,
You gotta get him away, yeah
Hey little bitch!
Be glad you finally walked away or you may have not lived another day."
Godsmack |
|
Back to top |
|
|
|