Guillaume GARDET
7f4b27057f
- Update to 1.11.0: * Big news: - Frontend, druntime and Phobos are at version 2.081.2. (#2752, #2772, #2776, #2791, #2815) (new) - Add some support for classes without TypeInfos, for -betterC and/or a minimal (d)runtime. (#2765) - LLVM for prebuilt packages upgraded to v6.0.1. The x86_64 packages feature some more LLVM targets for cross-compilation (experiments): MIPS, MSP430, RISC-V and WebAssembly. (#2760) - Rudimentary support for compiling & linking directly to WebAssembly. See the dedicated Wiki page for how to get started. (#2766, #2779, #2785) - AArch64 (64-bit ARM) now mostly working on Linux/glibc and Android. Current ltsmaster is able to bootstrap v1.11, which can also bootstrap itself; most tests pass. (Preliminary) CI has been set up. (#2802, #2817, #2813) (new) - LDC on Windows now uses 80-bit compile-time reals. This allows for seamless cross-compilation to other x86(_64) targets, e.g., without real.min underflowing to 0 and real.max overflowing to infinity. (#2752) - New @naked UDA in ldc.attributes & enhanced functionality for @llvmAttr("<name>"). (#2773) * Platform support: - Supports LLVM 3.7 - 6.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. - Alpine linux/x64: built against Musl libc to support Docker images based on the Alpine distro, requires the llvm5-libs, musl-dev, and gcc packages to build and link D apps and the tzdata and libcurl packages for certain stdlib modules. * Bug fixes: - extern(C++) on Posix: Pass non-PODs indirectly by value. (#2728) - extern(C++) on Windows/MSVC: Methods return all structs via hidden sret pointer. (#2720, #1935) - Make GC2Stack IR optimization pass work as intended. (#2750) - Work around inline assembly regression with LLVM 6 on Win32. The prebuilt Win32 package is now using LLVM 6.0.1 too. (#2629, #2770) - Fix overzealous check for multiple main() functions. (#2778) (new) - Fix corrupt prefix in integrated LLD's console output. (#2781) (new) - No context ptr for nested non-extern(D) functions. (#2808, #2809) (new) * Known issues: - LDC does not zero the padding area of a real variable. This may lead to wrong results if the padding area is also considered. See #770. Does not apply to real members inside structs etc. - Update bootstrap version to 0.17.6: * Added support for LLVM 6.0 and 7.0. (#2600, #2825) * Backported AArch64 fixes from master; most tests passing on Linux/glibc and Android * Fix generation of debug info. (#2594) * Added support for bootstrapping on DragonFly BSD * Fixed missing definition in std.datetime on Solaris * Fixed std.datetime unittest failure. (ldc-developers/phobos#59) * Fixed tests for PowerPC. (#2634, #2635) * Improvements for MIPS. * Make core.stdc.stdarg.va_* functions nothrow to enable compiling the 2.082 frontend. (#2821) * CI updates. - Remove upstreamed patches: * ldc-0.17.5-add_missing_include.patch * ldc-0.17.5-add_support_to_LLVM6.patch * ldc-0.17.5-backport_pr_2315.patch * ldc-0.17.5-default-to-pic.patch - Enable aarch64 since it can be boostrapped with ldc 0.17.6 - Fix x86_64 build by adding '-fPIC' to C_FLAGS of bootstrap OBS-URL: https://build.opensuse.org/request/show/631387 OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=20
201 lines
6.0 KiB
RPMSpec
201 lines
6.0 KiB
RPMSpec
#
|
|
# spec file for package ldc
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define so_ver 80
|
|
%define lname_runtime libdruntime-%{name}
|
|
%define lname_phobos libphobos2-%{name}
|
|
%bcond_without ldc_bootstrap
|
|
%bcond_with ldc_tests
|
|
Name: ldc
|
|
Version: 1.11.0
|
|
Release: 0
|
|
Summary: The LLVM D Compiler
|
|
License: BSD-3-Clause AND Artistic-1.0
|
|
Group: Development/Languages/Other
|
|
Url: https://wiki.dlang.org/LDC
|
|
Source0: https://github.com/ldc-developers/ldc/releases/download/v%{version}/ldc-%{version}-src.tar.gz
|
|
Source1: %{name}-rpmlintrc
|
|
Patch0: ldc-1.9.0-fix_arm_build.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: help2man
|
|
BuildRequires: libconfig++-devel
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libstdc++-devel
|
|
BuildRequires: llvm-clang
|
|
BuildRequires: llvm-devel >= 3.7
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: sqlite3-devel
|
|
BuildRequires: zlib-devel
|
|
# Should be installed, at least runtime
|
|
Recommends: ldc-phobos-devel = %{version}
|
|
Recommends: ldc-runtime-devel = %{version}
|
|
%if %{with ldc_bootstrap}
|
|
# v0.17.6 is the last version buildable with a C++ compiler, so use it for bootstrapping
|
|
Source10: https://github.com/ldc-developers/ldc/releases/download/v0.17.6/ldc-0.17.6-src.tar.gz
|
|
%endif
|
|
%if %{with ldc_tests}
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gdb
|
|
%endif
|
|
%if %{without ldc_bootstrap}
|
|
BuildRequires: ldc
|
|
BuildRequires: ldc-phobos-devel
|
|
BuildRequires: ldc-runtime-devel
|
|
%endif
|
|
%if %{with ldc_tests}
|
|
BuildRequires: python
|
|
%endif
|
|
%if %{with ldc_tests}
|
|
BuildRequires: timezone
|
|
BuildRequires: unzip
|
|
%endif
|
|
|
|
%description
|
|
LDC is an LLVM based compiler for the D programming language. It uses the
|
|
frontend of the reference compiler (DMD), thereby supporting the same language
|
|
features, but profits from LLVM's superior optimizing and code generation
|
|
capabilities.
|
|
|
|
%package -n %{lname_runtime}%{so_ver}
|
|
Summary: Minimal D runtime library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lname_runtime}%{so_ver}
|
|
The minimal runtime library required to support the D programming language.
|
|
|
|
%package runtime-devel
|
|
Summary: Development files for the D runtime library
|
|
Group: Development/Libraries/Other
|
|
Requires: %{lname_runtime}%{so_ver} = %{version}
|
|
Recommends: ldc-phobos-devel = %{version}
|
|
|
|
%description runtime-devel
|
|
This package contains the druntime development files necessary for developing
|
|
with LDC.
|
|
|
|
%package -n %{lname_phobos}%{so_ver}
|
|
Summary: The D standard library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lname_phobos}%{so_ver}
|
|
This package includes ldc's phobos library - The D standard library.
|
|
|
|
%package phobos-devel
|
|
Summary: Development files for the D standard library
|
|
Group: Development/Libraries/Other
|
|
Requires: %{lname_phobos}%{so_ver} = %{version}
|
|
Requires: %{name}-runtime-devel = %{version}
|
|
|
|
%description phobos-devel
|
|
This package contains the Phobos development files necessary for developing
|
|
with LDC.
|
|
|
|
%prep
|
|
%setup -q -n ldc-%{version}-src
|
|
%patch0 -p1
|
|
%if %{with ldc_bootstrap}
|
|
tar xf %{SOURCE10}
|
|
pushd ldc-0.17.6-src
|
|
popd
|
|
%endif
|
|
|
|
%build
|
|
%if %{with ldc_bootstrap}
|
|
pushd ldc-0.17.6-src
|
|
#Needs to be compiled with clang, but opensuse_rules.cmake forces gcc so disable rule
|
|
touch ./no-suse-rules
|
|
mkdir build && pushd build
|
|
# FIXME: you should use %%cmake macros
|
|
cmake \
|
|
-DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \
|
|
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
|
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
|
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
|
|
-DCMAKE_CXX_FLAGS="-std=c++11" \
|
|
-DCMAKE_C_FLAGS="-fPIC" \
|
|
..
|
|
make %{?_smp_mflags}
|
|
popd
|
|
popd
|
|
%endif
|
|
#Needs to be compiled with clang, but opensuse_rules.cmake forces gcc so disable rule
|
|
touch no-suse-rules
|
|
%cmake \
|
|
-DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \
|
|
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
|
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
|
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
|
|
%if %{with ldc_bootstrap}
|
|
-DD_COMPILER:PATH=`pwd`/../ldc-0.17.6-src/build/bin/ldmd2 \
|
|
%endif
|
|
-DCMAKE_CXX_FLAGS="-std=c++11"
|
|
make %{?_smp_mflags}
|
|
|
|
%if %{with ldc_tests}
|
|
%check
|
|
pushd build/
|
|
make %{?_smp_mflags} test
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
%cmake_install
|
|
# Build man pages
|
|
help2man %{buildroot}%{_bindir}/ldc2 > ldc2.1 && gzip ldc2.1
|
|
help2man %{buildroot}%{_bindir}/ldmd2 > ldmd2.1 && gzip ldmd2.1
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
install -m 644 -t %{buildroot}%{_mandir}/man1/ ldmd2.1.gz ldc2.1.gz
|
|
rm -rf %{buildroot}%{_libexecdir}/debug
|
|
|
|
%post -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
|
%post -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
|
%postun -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
|
%postun -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
|
%config %{_sysconfdir}/bash_completion.d/ldc2
|
|
%config %{_sysconfdir}/ldc2.conf
|
|
%{_bindir}/ldc*
|
|
%{_bindir}/ldmd2
|
|
|
|
%files -n %{lname_runtime}%{so_ver}
|
|
%{_libdir}/%{lname_runtime}-shared.so.*
|
|
%{_libdir}/%{lname_runtime}-debug-shared.so.*
|
|
|
|
%files runtime-devel
|
|
%{_libdir}/%{lname_runtime}-shared.so
|
|
%{_libdir}/%{lname_runtime}-debug-shared.so
|
|
%dir %{_includedir}/d
|
|
%{_includedir}/d/ldc
|
|
%{_includedir}/d/core
|
|
|
|
%files -n %{lname_phobos}%{so_ver}
|
|
%{_libdir}/%{lname_phobos}-shared.so.*
|
|
%{_libdir}/%{lname_phobos}-debug-shared.so.*
|
|
|
|
%files phobos-devel
|
|
%{_libdir}/%{lname_phobos}-shared.so
|
|
%{_libdir}/%{lname_phobos}-debug-shared.so
|
|
%{_includedir}/d/std
|
|
%{_includedir}/d/etc
|
|
|
|
%changelog
|