]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - lfs/glibc
glibc: Update to 2.5 on i586.
[people/teissler/ipfire-2.x.git] / lfs / glibc
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302 3# IPFire.org - A linux based firewall #
d10cf0df 4# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
70df8302
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
ee717901 27VER = 2.5
cd1a2927 28
dd714b8a 29THISAPP = glibc-$(VER)
cd1a2927 30DL_FILE = $(THISAPP).tar.bz2
7a98bae5 31DL_FROM = $(URL_IPFIRE)
cd1a2927 32DIR_APP = $(DIR_SRC)/$(THISAPP)
cd1a2927
MT
33
34# Normal build or /tools build.
35#
36ifeq "$(ROOT)" ""
37 TARGET = $(DIR_INFO)/$(THISAPP)
38 EXTRA_CONFIG = --prefix=/usr \
1d2919b2 39 --disable-profile --enable-add-ons \
dd714b8a 40 --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
cd1a2927
MT
41 EXTRA_MAKE =
42 EXTRA_INSTALL =
43else
44 TARGET = $(DIR_INFO)/$(THISAPP)-tools
45 EXTRA_CONFIG = --prefix=/tools \
1d2919b2 46 --disable-profile --enable-add-ons \
dd714b8a
MT
47 --enable-kernel=2.6.0 --with-binutils=/tools/bin \
48 --without-gd --with-headers=/tools/include \
49 --without-selinux
e22c7973
MT
50 EXTRA_MAKE =
51 EXTRA_INSTALL =
cd1a2927
MT
52endif
53
d10cf0df
AF
54EXTRA_CONFIG += --build=$(BUILDTARGET)
55
cc72d5cb 56ifeq "$(MACHINE_TYPE)" "arm"
51f9e7ac
MT
57 # Disable hardware FP for ARM.
58 EXTRA_CONFIG += \
1d2919b2 59 --without-fp
51f9e7ac
MT
60endif
61
cd1a2927
MT
62###############################################################################
63# Top-level Rules
64###############################################################################
65
dd714b8a
MT
66objects = $(DL_FILE) \
67 glibc-libidn-$(VER).tar.bz2
cd1a2927
MT
68
69$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
dd714b8a 70glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2
cd1a2927 71
ee717901
MT
72$(DL_FILE)_MD5 = 1fb29764a6a650a4d5b409dda227ac9f
73glibc-libidn-$(VER).tar.bz2_MD5 = 8787868ba8962d9b125997ec2f25ac01
51f9e7ac
MT
74
75# ARM needs glibc-ports
cc72d5cb 76ifeq "$(MACHINE_TYPE)" "arm"
51f9e7ac
MT
77 objects += glibc-ports-$(VER).tar.bz2
78 glibc-ports-$(VER).tar.bz2 = $(DL_FROM)/glibc-ports-$(VER).tar.bz2
79 glibc-ports-$(VER).tar.bz2_MD5 = 183f6d46e8fa5e4b2aff240ab1586c2e
80endif
cd1a2927
MT
81
82install : $(TARGET)
83
84check : $(patsubst %,$(DIR_CHK)/%,$(objects))
85
86download :$(patsubst %,$(DIR_DL)/%,$(objects))
87
88md5 : $(subst %,%_MD5,$(objects))
89
90###############################################################################
91# Downloading, checking, md5sum
92###############################################################################
93
94$(patsubst %,$(DIR_CHK)/%,$(objects)) :
95 @$(CHECK)
96
97$(patsubst %,$(DIR_DL)/%,$(objects)) :
98 @$(LOAD)
99
100$(subst %,%_MD5,$(objects)) :
101 @$(MD5)
102
103###############################################################################
104# Installation Details
105###############################################################################
106
107$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
108 @$(PREBUILD)
109 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd1a2927 110 @mkdir $(DIR_SRC)/glibc-build
cc72d5cb 111ifeq "$(MACHINE_TYPE)" "arm"
51f9e7ac
MT
112 cd $(DIR_APP) && tar jxf $(DIR_DL)/glibc-ports-$(VER).tar.bz2
113 cd $(DIR_APP) && mv -v glibc-ports-$(VER) ports
114
115 cd $(DIR_APP)/ports && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-ports-avoid-using-asm-procinfo.patch
116
117 # asm/page.h should not be included in sysdeps/unix/sysv/linux/arm/ioperm.c.
118 cd $(DIR_APP) && sed "/asm\/page.h/d" -i ports/sysdeps/unix/sysv/linux/arm/ioperm.c
51f9e7ac 119endif
82a8499a 120
9b0ff0a0 121ifeq "$(ROOT)" ""
dd714b8a
MT
122 # This locale causes a loop on bash login - exclude it
123 cd $(DIR_APP) && sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
cc72d5cb 124ifeq "$(MACHINE_TYPE)" "arm"
51f9e7ac
MT
125 cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.3 -o|' \
126 scripts/test-installation.pl
127else
dd714b8a
MT
128 cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
129 scripts/test-installation.pl
9b0ff0a0 130endif
51f9e7ac
MT
131endif
132 cd $(DIR_SRC)/glibc-build && CFLAGS="$(CFLAGS)" $(DIR_APP)/configure $(EXTRA_CONFIG)
9b0ff0a0 133
cd1a2927
MT
134ifeq "$(ROOT)" ""
135 touch /etc/ld.so.conf
dd714b8a 136 cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd1a2927
MT
137 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
138else
139 -mkdir /tools/etc
140 touch /tools/etc/ld.so.conf
dd714b8a
MT
141 cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
142 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
cd1a2927
MT
143endif
144
145 # Creating the locales
146ifeq "$(ROOT)" ""
147 mkdir -p /usr/lib/locale
cd1a2927
MT
148 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
149 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
cd1a2927 150endif
cd1a2927
MT
151 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
152 @$(POSTBUILD)