forked from gperciva/gub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glibc-core.py
46 lines (42 loc) · 1.72 KB
/
glibc-core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from gub import misc
from gub import target
from gub.specs import glibc
# Hmm? TARGET_CFLAGS=-O --> target.py
class Glibc_core (glibc.Glibc):
source = 'http://lilypond.org/download/gub-sources/glibc-2.3-20070416.tar.bz2'
patches = glibc.Glibc.patches + ['glibc-2.3-core-install.patch']
dependencies = ['cross/gcc-core', 'linux-headers', 'tools::bison']
configure_flags = (glibc.Glibc.configure_flags
+ misc.join_lines ('''
--without-tls
--without-__thread
'''))
make_flags = (glibc.Glibc.make_flags
# avoid -lgcc_eh, which gcc-core does not have
+ ' gnulib=-lgcc')
compile_flags = glibc.Glibc.compile_flags + ' lib'
install_flags = (glibc.Glibc.install_flags
.replace (' install ', ' install-lib-all install-headers '))
subpackage_names = ['']
def get_conflict_dict (self):
return {'': ['glibc', 'glibc-devel', 'glibc-doc', 'glibc-runtime']}
def get_add_ons (self):
return ('linuxthreads',)
def install (self):
glibc.Glibc.install (self)
self.system ('''
mkdir -p %(install_prefix)s/include/gnu
touch %(install_prefix)s/include/gnu/stubs.h
cp %(srcdir)s/include/features.h %(install_prefix)s/include
mkdir -p %(install_prefix)s/include/bits
cp %(builddir)s/bits/stdio_lim.h %(install_prefix)s/include/bits
''')
class Glibc_core__linux__ppc (Glibc_core):
# ugh, but the gnulib=-lgcc hack does something else on ppc...
# it (huh?) drops *-lgcc* (instead of -lgcc_eh) from libc.so
# linkage, which then fails.
make_flags = glibc.Glibc.make_flags
class Glibc_core__linux__mipsel (Glibc_core):
patches = Glibc_core.patches + [
'glibc-2.3-mips-syscall.patch',
]