Skip to content

Commit 1ec1f8a

Browse files
committed
glibc-emul32: add rest of needed lines
1 parent 6c05397 commit 1ec1f8a

7 files changed

+32
-402
lines changed

obsoleteman/glibc/actions.py

+25-48
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
defaultflags = "-O3 -g -fasynchronous-unwind-tables -mtune=generic -march=%s" % arch
1818
if get.buildTYPE() == "emul32": defaultflags += " -m32"
1919
# this is getting ridiculous, also gdb3 breaks resulting binary
20-
#sysflags = get.CFLAGS().replace("-fstack-protector", "").replace("-D_FORTIFY_SOURCE=2", "").replace("-funwind-tables", "").replace("-fasynchronous-unwind-tables", "")
2120
#sysflags = "-mtune=generic -march=x86-64" if get.ARCH() == "x86_64" else "-mtune=generic -march=i686"
2221

2322
### helper functions ###
@@ -30,6 +29,9 @@ def removePisiLinuxSection(_dir):
3029
i = os.path.join(root, name)
3130
shelltools.system('objcopy -R ".comment.PISILINUX.OPTs" -R ".note.gnu.build-id" %s' % i)
3231

32+
ldconf32bit = """/lib32
33+
/usr/lib32
34+
"""
3335

3436
def setup():
3537
shelltools.export("LANGUAGE","C")
@@ -45,6 +47,7 @@ def setup():
4547
shelltools.makedirs("build")
4648
shelltools.cd("build")
4749
options = "--prefix=/usr \
50+
--libdir=/usr/lib \
4851
--mandir=/usr/share/man \
4952
--infodir=/usr/share/info \
5053
--libexecdir=/usr/lib/misc \
@@ -62,6 +65,7 @@ def setup():
6265
--with-tls"
6366
if get.buildTYPE() == "emul32":
6467
options += "\
68+
--libdir=/usr/lib32 \
6569
--enable-multi-arch i686-pc-linux-gnu \
6670
"
6771

@@ -76,7 +80,7 @@ def build():
7680
shelltools.echo("configparms", "bindir=/tmp32")
7781
shelltools.echo("configparms", "sbindir=/tmp32")
7882
shelltools.echo("configparms", "rootsbindir=/tmp32")
79-
shelltools.echo("configparms", "datarootdir=/tmp32")
83+
shelltools.echo("configparms", "datarootdir=/tmp32/share")
8084

8185
autotools.make()
8286

@@ -90,69 +94,41 @@ def build():
9094

9195
autotools.make()
9296

97+
def check():
98+
shelltools.cd("build")
99+
autotools.make("check || true")
100+
101+
93102
def install():
94103
shelltools.cd("build")
95104

96105
autotools.rawInstall("install_root=%s" % get.installDIR())
97-
if get.buildTYPE() == "emul32":
98-
pisitools.removeDir("/tmp32")
99-
100-
# Remove our options section from crt stuff
101-
#removePisiLinuxSection("%s/usr/%s/" % (get.installDIR(), cfg["libdir"]))
102-
103-
104-
### real actions start here ###
105-
#def setup():
106-
#if multibuild:
107-
#libcSetup(config["multiarch"])
108106

109-
#libcSetup(config["system"])
107+
pisitools.dodir("/etc/ld.so.conf.d")
110108

109+
if get.buildTYPE() != "emul32":
110+
#Install locales once.
111+
autotools.rawInstall("install_root=%s localedata/install-locales" % get.installDIR())
111112

112-
#def build():
113-
#if multibuild:
114-
#libcBuild(config["multiarch"])
113+
# Remove our options section from crt stuff
114+
removePisiLinuxSection("%s/usr/lib/" % get.installDIR())
115115

116-
#libcBuild(config["system"])
117-
118-
119-
# FIXME: yes fix me
120-
#def check():
121-
# set_variables(cfg)
122-
# shelltools.chmod("scripts/begin-end-check.pl")
123-
#
124-
# shelltools.cd("build")
125-
#
126-
# shelltools.export("TIMEOUTFACTOR", "16")
127-
# autotools.make("-k check 2>error.log")
128116

117+
if get.buildTYPE() == "emul32":
118+
pisitools.dosym("/lib32/ld-linux.so.2", "/lib/ld-linux.so.2")
129119

130-
#def install():
131-
## we do second arch first, to allow first arch to overwrite headers, etc.
132-
## stubs-32.h, elf.h, vm86.h comes only with 32bit
133-
#if multibuild:
134-
#libcInstall(config["multiarch"])
135-
##pisitools.dosym("../lib32/ld-linux.so.2", "/lib/ld-linux.so.2")
136-
## FIXME: these should be added as additional file, when we can define pkg per arch
137-
#pisitools.dodir("/etc/ld.so.conf.d")
138-
#shelltools.echo("%s/etc/ld.so.conf.d/60-glibc-32bit.conf" % get.installDIR(), ldconf32bit)
120+
shelltools.echo("%s/etc/ld.so.conf.d/60-glibc-32bit.conf" % get.installDIR(), ldconf32bit)
139121

140-
#libcInstall(config["system"])
122+
# Remove our options section from crt stuff
123+
removePisiLinuxSection("%s/usr/lib32/" % get.installDIR())
141124

142-
## localedata can be shared between archs
143-
#shelltools.cd(config["system"]["builddir"])
144-
#autotools.rawInstall("install_root=%s localedata/install-locales" % get.installDIR())
125+
pisitools.removeDir("/tmp32")
145126

146-
## now we do generic stuff
147-
#shelltools.cd(pkgworkdir)
148127

149128
# We'll take care of the cache ourselves
150129
if shelltools.isFile("%s/etc/ld.so.cache" % get.installDIR()):
151130
pisitools.remove("/etc/ld.so.cache")
152131

153-
# It previously has 0755 perms which was killing things
154-
#shelltools.chmod("%s/usr/%s/misc/pt_chown" % (get.installDIR(), config["system"]["libdir"]), 04711)
155-
156132
# Prevent overwriting of the /etc/localtime symlink
157133
if shelltools.isFile("%s/etc/localtime" % get.installDIR()):
158134
pisitools.remove("/etc/localtime")
@@ -171,5 +147,6 @@ def install():
171147
#if shelltools.isFile("%s/usr/sbin/%s" % (get.installDIR(), i)):
172148
#pisitools.remove("/usr/sbin/%s" % i)
173149

174-
#pisitools.dodoc("BUGS", "ChangeLog*", "CONFORMANCE", "NAMESPACE", "NEWS", "PROJECTS", "README*", "LICENSES")
150+
shelltools.cd("..")
151+
pisitools.dodoc("BUGS", "ChangeLog*", "CONFORMANCE", "NAMESPACE", "NEWS", "PROJECTS", "README*", "LICENSES")
175152

obsoleteman/glibc/files/60-glibc-32bit.conf

-2
This file was deleted.

obsoleteman/glibc/files/64yama.patch

-134
This file was deleted.

obsoleteman/glibc/files/glibc-2.19-fix-sign-in-bsloww1-input.patch

-55
This file was deleted.

obsoleteman/glibc/files/glibc-2.19-xattr_header.patch

-42
This file was deleted.

0 commit comments

Comments
 (0)