public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] breaking out libgcc and friends
@ 2004-09-16  3:21 Travis Tilley
  2004-09-17 21:24 ` David Bryson
  0 siblings, 1 reply; 2+ messages in thread
From: Travis Tilley @ 2004-09-16  3:21 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

alright, so embedded needs/wants a broken out libgcc and there are 
apparently archs that need libgcc in /lib for binaries used to bring up 
the system (i hear maybe arm and ia64?? more info here would be 
appreciated). the question is how are we going to break stuff out 
-cleanly- without, erm... breaking stuff.

how are we going to handle slots?
how about multiple installed versions of libgcc when they all have the 
same soversion? i dont think we can do that if they live in /lib...
another problem: how are we going to handle archs where the soversion is 
2 for the same libgcc that has soversion 1 on another arch (where does 
this happen btw? alpha and...)? how could we possibly slot that 
correctly with the current support available in portage?
what about gcc itself? we'll still need to compile the static libs and 
put them in a versioned directory, along with .so symlinks.

i've been working on trying to make stuff more modular and maintainable 
with toolchain.eclass, but i need feedback. lots of it, and from more 
than just toolchain@gentoo.org...

here's a quickie libgcc ebuild for starters. with multilib enabled here, 
it just installs:

/lib32/libgcc_s.so.1 -> libgcc_s-3.4.2.so.1
/lib32/libgcc_s-3.4.2.so.1
/lib64/libgcc_s.so.1 -> libgcc_s-3.4.2.so.1
/lib64/libgcc_s-3.4.2.so.1

(the libgcc_s_32.so symlink to /lib32/libgcc_s.so.1 would need to be 
created by gcc itself and placed in the versioned directory)

anyone who wishes to beat some sanity into me is welcome to do so ;)

[-- Attachment #2: libgcc-3.4.2.ebuild --]
[-- Type: text/plain, Size: 1817 bytes --]

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libstdc++-v3/libstdc++-v3-3.3.4-r1.ebuild,v 1.2 2004/09/06 14:56:36 lv Exp $

inherit eutils gnuconfig toolchain

DESCRIPTION="GCC support library"
HOMEPAGE="http://gcc.gnu.org/"
LICENSE="GPL-2 LGPL-2.1"
#KEYWORDS="-* ~x86 ~mips ~amd64 ~ppc64 ~ppc"
# just until i know for sure the toolchain eclass is done
KEYWORDS="-*"

GENTOO_TOOLCHAIN_BASE_URI="http://dev.gentoo.org/~lv/GCC/"
#PATCH_VER="1.1"

PP_VER="3_4_1"
PP_FVER="${PP_VER//_/.}-1"
GCC_MANPAGE_VERSION="none"

SRC_URI="$(get_gcc_src_uri)"
S="$(gcc_get_s_dir)"
ETYPE="gcc-compiler"
#SO_VERSION_SLOT="1"
GCC_TARGET_NO_MULTILIB="false"
GCC_VAR_TYPE="versioned"
GCC_LANG="c++"

SLOT="1"

DEPEND="virtual/libc
	>=sys-devel/binutils-2.14.90.0.6-r1
	>=sys-devel/bison-1.875
	sys-devel/gcc"

src_compile() {
	gcc_do_filter_flags
	einfo "CFLAGS=\"${CFLAGS}\""
	einfo "CXXFLAGS=\"${CXXFLAGS}\""

	# Build in a separate build tree
	mkdir -p ${WORKDIR}/build
	pushd ${WORKDIR}/build > /dev/null

	# the --with-slibdir thing actually makes libgcc_s install to /lib.
	# yeah, i know it says /usr. no, i dont get it either.
	gcc_do_configure --with-slibdir=/usr
	make configure-host

	# we really dont want to rebuild this when we never even install it
	cp /usr/$(get_libdir)/libiberty.a ${WORKDIR}/build/libiberty

	cd gcc
	# this builds more than we need, but there really isnt an easier way
	make CFLAGS="-O2 -fPIC" libgcc.a
}

src_install() {
	cd ${WORKDIR}/build/gcc
	make DESTDIR=${D} install-libgcc

	# we dont want anything else other than libgcc_s*
	rm -rf ${D}/usr/
	# we dont want any .so files... just .so.soversion
	rm -f $(find ${D} -name '*.so')

	# add ${PV} to the library name
	add_version_to_shared
}



[-- Attachment #3: Type: text/plain, Size: 37 bytes --]

--
gentoo-dev@gentoo.org mailing list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] breaking out libgcc and friends
  2004-09-16  3:21 [gentoo-dev] breaking out libgcc and friends Travis Tilley
@ 2004-09-17 21:24 ` David Bryson
  0 siblings, 0 replies; 2+ messages in thread
From: David Bryson @ 2004-09-17 21:24 UTC (permalink / raw
  To: Travis Tilley; +Cc: gentoo-dev

I noticed that gcc make system can't seem to figure out what to
install.

here is the end of ebuild libgcc-3.4.2.ebuild package

make[1]: Leaving directory
`/var/tmp/portage/libgcc-3.4.2/work/build/gcc'
man:
prepallstrip:
strip: 
>>> Completed installing into /var/tmp/portage/libgcc-3.4.2/image/

./
>>> Done.

a bug ?

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-17 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16  3:21 [gentoo-dev] breaking out libgcc and friends Travis Tilley
2004-09-17 21:24 ` David Bryson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox