blob: ec1235d91178cece3c9c326584627a2b3c81e418 (
plain)
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
47
48
49
50
51
52
53
|
# Maintainer: Jesus Alonso <doragasu at hotmail dot com>
# NOTE: As I want these packages for Genesis/Megadrive development, they do
# only support the m68000 CPU. If you want to support other m68k variants,
# either modify _target_cpu to suit your needs, or go wild, remove the
# --with-cpu switches and change --disable-multilib with --enable-multilib.
# Be warned that multilib packages will take a lot more time to build, and
# will also require more disk space.
_target=m68k-elf
_target_cpu=m68000
pkgname=${_target}-newlib
# Latest version 4.4.0.20231231 does not build with GCC 14.1, so stay in previous release
pkgver=4.5.0
_suffix=.20241231
pkgrel=1
pkgdesc="C library for bare metal systems (${_target})."
arch=(any)
url="https://sourceware.org/newlib/"
license=('BSD')
groups=(devel)
depends=("${_target}-binutils")
makedepends=("${_target}-gcc-bootstrap>=4.3.0")
options=('!makeflags' '!strip' 'staticlibs' '!libtool')
PKGEXT="pkg.tar.zst"
source=("ftp://sourceware.org/pub/newlib/newlib-${pkgver}${_suffix}.tar.gz")
sha512sums=('d391ea3ac68ddb722909ef790f81ba4d6c35d9b2e0fcdb029f91a6c47db9ee94a686a2bdff211fb84025e1a317e257acfa59abda3fd2bc6609966798e1c604dc')
prepare() {
mkdir ${srcdir}/newlib-build
}
build() {
cd ${srcdir}/newlib-build
# Should remove -Wno-implicit-function-declaration and -Wno-implicit-int when newlib fixes the build
export CFLAGS_FOR_TARGET="-Os -g -ffunction-sections -fdata-sections -fomit-frame-pointer -ffast-math -Wno-implicit-function-declaration -Wno-implicit-int"
../newlib-${pkgver}${_suffix}/configure \
--target=${_target} \
--prefix=/usr \
--disable-newlib-supplied-syscalls \
--disable-multilib \
--with-cpu=${_target_cpu} \
--disable-nls
make
}
package() {
cd ${srcdir}/newlib-build
DESTDIR=${pkgdir}/ make install
# usr/share/info/porting.info.gz conflicts with newlib installs for other architectures
rm -r ${pkgdir}/usr/share
}
|