- Update to 1.39.0:
- Drop upstream patch merge in 1.34.0: * riscv64-default-target.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=70
This commit is contained in:
commit
08d5df33e9
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
ldc-1.32.2-src.tar.gz
Normal file
3
ldc-1.32.2-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bfa4aaee74320a1268843c88e229f339b2df0953a4bcb4fced52ebe0dda1cd95
|
||||
size 8116363
|
3
ldc-1.39.0-src.tar.gz
Normal file
3
ldc-1.39.0-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:839bac36f6073318e36f0b163767e03bdbd3f57d99256b97494ac439b59a4562
|
||||
size 8554301
|
12
ldc-1.9.0-fix_arm_build.patch
Normal file
12
ldc-1.9.0-fix_arm_build.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- ldc-1.9.0-src.orig/runtime/druntime/src/ldc/arm_unwind.c 2018-06-05 15:47:25.521618323 +0200
|
||||
+++ ldc-1.9.0-src/runtime/druntime/src/ldc/arm_unwind.c 2018-06-06 09:44:20.368786818 +0200
|
||||
@@ -26,7 +26,8 @@ _Unwind_Ptr _d_eh_GetIP(_Unwind_Context
|
||||
#ifdef __GLIBC__
|
||||
_Unwind_Ptr _d_eh_GetIPInfo(_Unwind_Context *context, int *ptr)
|
||||
{
|
||||
- return _Unwind_GetIPInfo(context, ptr);
|
||||
+ *ptr = 0;
|
||||
+ return _Unwind_GetIP(context);
|
||||
}
|
||||
#endif
|
||||
|
3
ldc-rpmlintrc
Normal file
3
ldc-rpmlintrc
Normal file
@ -0,0 +1,3 @@
|
||||
# library has a slightly other name, ignore this false positive
|
||||
addFilter("W: no-dependency-on ldc-runtime*")
|
||||
addFilter("W: no-dependency-on ldc-phobos*")
|
917
ldc.changes
Normal file
917
ldc.changes
Normal file
@ -0,0 +1,917 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 3 13:47:14 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.39.0:
|
||||
- Drop upstream patch merge in 1.34.0:
|
||||
* riscv64-default-target.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 6 10:18:55 UTC 2023 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- riscv64-default-target.patch: Default to rv64gc for hosted riscv64
|
||||
target
|
||||
- Enable build on riscv64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 7 08:32:51 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.32.2:
|
||||
* Big news
|
||||
- New command-line option --fwarn-stack-size=<threshold> with
|
||||
LLVM 13+. (#4378)
|
||||
- New command-line option --fsplit-stack for incremental stack
|
||||
allocations, see https://llvm.org/docs/SegmentedStacks.html. (#4379)
|
||||
- New UDA ldc.attributes.noSplitStack disables it on a per-function
|
||||
basis. (#4382)
|
||||
- New command-line option --indent for the timetrace2txt tool.
|
||||
(#4391)
|
||||
* Bug fixes
|
||||
- Fix potentially huge compile slowdowns with -g and LLVM 15+.
|
||||
(#4354, #4393)
|
||||
- Treat all LLVM warnings as regular warnings (e.g., errors
|
||||
with -w). Requires LLVM 13+. (#4384)
|
||||
- Skipped 1.32.1:
|
||||
* Big news
|
||||
- The prebuilt Linux packages are now generated on a Ubuntu 20.04
|
||||
box, so the min required glibc version has been raised from
|
||||
2.26 to 2.31. (#4367)
|
||||
* Bug fixes
|
||||
- Fix empty ldc.gccbuiltins_* modules with LLVM 15+.
|
||||
(#4347, #4350)
|
||||
- Fix v1.31 regression wrt. potentially wrong constant pointer
|
||||
offsets. (#4362, #4365)
|
||||
- Windows: Fix v1.32 regression wrt. leaking Throwable.info
|
||||
backtraces. (#4369)
|
||||
- Fix C assert calls for newlib targets. (#4351)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 7 06:25:04 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Do not use %{_includedir}/d to be able to install/use multiple
|
||||
D compilers in parallel - boo#1212913
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:52:58 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Add specific conflict from runtime-devel to the old/previous
|
||||
libdruntime-ldc99. which contained an unversioned file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 20 10:28:50 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Only move bash-completion from /etc to /usr/share if this was not
|
||||
properly installed. There was an error that
|
||||
bash-completion-devel did not actually contain the .cmake file
|
||||
which in turn resulted in this package mis-installing despite the
|
||||
correct build deps.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 11 12:23:35 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Move %{_libdir}/ldc_rt.dso.o to runtime-devel package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 6 14:52:02 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Use llvm15 when available (Tumbleweed + Leap 15.5)
|
||||
- Update to 1.32.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.102.2. (#4323, #4341) (new)
|
||||
- LLVM for prebuilt packages bumped to v15.0.7. (#4311)
|
||||
- Linker-level dead code elimination is enabled by default for Apple,
|
||||
wasm and all ELF targets too now. (#4320)
|
||||
- Vector comparisons (==, !=, <, <=, >, >=) now yield a vector mask.
|
||||
Identity comparisons (is, !is) still yield a scalar bool. (3a59ee8)
|
||||
- New timetrace2txt tool for easier inspection of --ftime-trace
|
||||
output. (#4335) (new)
|
||||
- --ftime-trace now also traces CTFE execution: the start
|
||||
expression of CTFE and function calls during CTFE. (#4339) (new)
|
||||
* Platform support
|
||||
- Supports LLVM 9.0 - 15.0.
|
||||
- Now supports -mabi for RISC-V targets. (#4322)
|
||||
* Bug fixes
|
||||
- GC closures including variables with alignment > 16 bytes are
|
||||
now properly aligned. (ef8ba48)
|
||||
- Fix regression with LLVM 13+: some errors in inline assembly
|
||||
don't stop compilation. (#4293, #4331)
|
||||
- Changelog from skipped 1.31.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.101.2. (#4141, #4279)
|
||||
- Bit fields support. (#4015)
|
||||
- macOS on Apple M1: linking with -g is working again without
|
||||
unaligned pointer warnings/errors. This fixes file:line debug
|
||||
information in exception backtraces (requiring atos, a macOS
|
||||
development tool installed with Xcode), without the need to set
|
||||
MACOSX_DEPLOYMENT_TARGET=11 and using a modified LLVM. (#4291)
|
||||
- Preliminary support for LLVM 15, incl. adding support for the
|
||||
'new' pass manager (-passmanager) and opaque IR pointers
|
||||
(-opaque-pointers). (way too many PRs to list!)
|
||||
- New command-line option -fno-delete-null-pointer-checks,
|
||||
mimicking the same option of GCC and Clang. (#4297)
|
||||
- New UDA ldc.attributes.callingConvention("..."), which
|
||||
overrides the default calling convention. For expert use only! (#4299)
|
||||
- New command-line option -fno-discard-value-names to keep
|
||||
value names in LLVM IR. (#4012)
|
||||
- dcompute: Support for OpenCL image I/O. (#3835)
|
||||
* Platform support
|
||||
- Initial ABI support for 64-bit RISC-V. (#4007)
|
||||
* Bug fixes
|
||||
- dcompute: Fix v1.29 regression when trying to use
|
||||
intrinsics. (#4266, #4267)
|
||||
- Fix 64-bit symbol offsets. (#4264, #4283)
|
||||
- Add missing 32-bit LTO versions of druntime & Phobos to
|
||||
Linux multilib package. (#4234, #4235)
|
||||
- Fix compiler crash. (#4130, #4135)
|
||||
* Internals
|
||||
- The former druntime and dmd-testsuite git submodules are now
|
||||
part of the LDC repo directly, leaving Phobos as single
|
||||
remaining submodule. We are now using a subset of the DMD
|
||||
repo (which includes druntime since v2.101), rewritten via
|
||||
git filter-repo and exposed as dmd-rewrite-* branches/tags
|
||||
in the LDC repo, to merge newer frontend+druntime+tests from
|
||||
upstream DMD. The tests/d2/dmd-testsuite dir was moved to
|
||||
tests/dmd. (#4274, #4276)
|
||||
- Changelog from skipped 1.30.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.100.1.
|
||||
(#3970, #4008, #4009) (new)
|
||||
- LLVM for prebuilt packages bumped to v14.0.3.
|
||||
(#3952, #3979)
|
||||
- All LLVM targets are enabled now (=> more targets for
|
||||
cross-compilation).
|
||||
- For the Mac package, the minimum supported macOS version
|
||||
has been raised to v10.12.
|
||||
- The minimum D version for bootstrapping has been raised to
|
||||
v2.079 (for GDC: v9.4), in line with DMD. (#3956)
|
||||
- The minimum LLVM version has been raised to v9.0. (#3960)
|
||||
- New LeakSanitizer support via -fsanitize=leak (not (yet?)
|
||||
supported on Windows). (#4005) (new)
|
||||
- New prebuilt universal macOS package, runnable on both
|
||||
x86_64 and arm64, and enabling x86_64/arm64 macOS/iOS
|
||||
cross-compilation targets out of the box (-mtriple={x86_64,arm64}-apple-{macos,ios}).
|
||||
The x86_64 package doesn't bundle any arm64 libs anymore;
|
||||
the arm64 package newly bundles iOS libs (arm64). (#3958)
|
||||
- Avoid an external x86_64-only dub, use the bundled universal
|
||||
dub executable instead.
|
||||
* Platform support
|
||||
- Supports LLVM 9.0 - 14.0.
|
||||
* Bug fixes
|
||||
- Enable output of variable names in ASan and MSan error
|
||||
reporting. (#4004) (new)
|
||||
- Report unexpected type repaints as fatal ICEs instead of
|
||||
crashing. (#3990, #3991) (new)
|
||||
* Internals
|
||||
- Main CI was moved from Azure Pipelines to GitHub Actions.
|
||||
Any fork on GitHub can trivially reuse the fully automated
|
||||
prebuilt packages generation & upload to a GitHub release. (#3978)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 25 07:33:17 UTC 2022 - Max Lin <mlin@suse.com>
|
||||
|
||||
- Force to use llvm14 in Leap 15.5 since the default llvm version is
|
||||
now llvm15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 21 15:02:29 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Do not have the main package recommend the bash-completion
|
||||
sub-package, but rather have the subpackage supplement the
|
||||
combination of ldc and bash-completion.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 7 14:51:48 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Build against llvm14 for Tumbleweed since llvm15 is not
|
||||
supported yet
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 10 07:39:30 UTC 2022 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
- Use gcc-d (gdc) for bootstrapping as recommended by upstream.
|
||||
Only gdc is needed for bootstrapping instead of various older ldc
|
||||
versions, which also allows to use newer versions of LLVM
|
||||
(boo#1199054). On top of that, this allows ldc to use the shared
|
||||
runtime built with itself.
|
||||
- Drop use of binutils-gold, 1.29.0 does not use it by default anymore
|
||||
- Mention %so_ver in %files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 12 11:47:22 CEST 2022 - Chris Josten <chris+suse@netsoj.nl>
|
||||
|
||||
- Update to 1.29.0:
|
||||
* Frontend, druntime and Phobos are at version 2.099.1
|
||||
* Support for LLVM 13 and LLVM 14
|
||||
* New @hidden UDA (as counterpart of export).
|
||||
* Support 'raw mangles' via leading \1 in pragma(mangle) strings,
|
||||
e.g., to access magic linker symbols on Mac.
|
||||
* New @noSanitize UDA to selectively disable sanitizer
|
||||
instrumentation of functions.
|
||||
* WebAssembly: Larger default stack size (1 MB) and protection
|
||||
against stack overflow overwriting global memory.
|
||||
* LDC doesn't default to the ld.gold linker anymore. The
|
||||
combination of LLVM 13+ and older gold linkers can apparently
|
||||
cause problems. We recommend using LLD, e.g., via -linker=lld
|
||||
or by setting your default /usr/bin/ld symlink; it's
|
||||
significantly faster too.
|
||||
* -linkonce-templates is less aggressive by default now and
|
||||
IMHO production-ready.
|
||||
* When linking manually (not via LDC) against shared druntime, it
|
||||
is now required to link the bundled lib/ldc_rt.dso.o[bj] object
|
||||
file into each binary. It replaces the previously
|
||||
Windows-specific dso_windows.obj.
|
||||
* Basic compiler support for Newlib targets, i.e., triples
|
||||
like arm-none-newlibeabi.
|
||||
* dcompute: Add support for OpenCL image I/O.
|
||||
* Revamped and improved -ftime-trace implementation for compiler
|
||||
profiling/tracing, now excluding LLVM-internal traces, adding
|
||||
frontend memory tracing, source file location infos etc
|
||||
* Implement core.atomic.pause() for some architectures.
|
||||
* Bug fixes:
|
||||
* Linux: Make LTO work with LLD.
|
||||
* Capture NRVO variable by ref for stack closures.
|
||||
* -ftime-trace: JSON-escape filenames.
|
||||
* RISC-V: Use 128-bit quadruple real.
|
||||
* Linux x86/x64: Fix TLS range with static druntime and bfd/lld
|
||||
linkers.
|
||||
* Support rdtscp in DMD-style inline assembly.
|
||||
* Fix dynamic casts across binary boundaries (DLLs etc.).
|
||||
* Don't silently ignore invalid external tool specifications.
|
||||
* LLVM v11.1: Add missing PGO ldc-profdata tool.
|
||||
* ICE for 64-bit targets with 32-bit pointer size.
|
||||
* Breaking ABI changes:
|
||||
* extern(D): formal parameters of non-variadic functions aren't
|
||||
reversed anymore, in line with the spec.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 17 13:49:15 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
|
||||
- Update to 1.26.0:
|
||||
* Frontend, druntime and Phobos are at version 2.096.1+
|
||||
incl. new ldmd2 command-line option -gdwarf=<version>
|
||||
* Supports LLVM 6.0 - 12.0
|
||||
* LDC invocations can now be nicely profiled via --ftime-trace.
|
||||
* Struct TypeInfos are emitted into referencing object files only,
|
||||
and special TypeInfo member functions into the owning object
|
||||
file only.
|
||||
* Bug fixes:
|
||||
* TypeInfo for interface gives invalid string for name.
|
||||
* dcompute: Don’t reject CUDA versions 7.x - 8.0.0.
|
||||
* Don’t enforce the frame pointer for functions with GCC-style
|
||||
inline asm.
|
||||
* Fix some cases of insufficient alignment for arguments and
|
||||
parameters.
|
||||
* Fix a few issues with LLVM 12.
|
||||
* Add source location information for TypeInfo diagnostics
|
||||
with -betterC.
|
||||
* Keep init symbols of built-in TypeInfo classes mutable just
|
||||
like any other TypeInfo, so that e.g. synchronized() can be
|
||||
used on the implicit monitor.
|
||||
* Predefine version FreeStanding when targeting bare-metal.
|
||||
* druntime: Define rt.aaA.AA as naked pointer, no struct wrapper
|
||||
* Misc. fixes and improvements for the CMake scripts,
|
||||
incl. new defaults for LDC_INSTALL_{LTOPLUGIN,LLVM_RUNTIME_LIBS}
|
||||
* -cleanup-obj: Put object files into unique temporary directory
|
||||
by default.
|
||||
* druntime: Add missing core.atomic.atomicFetch{Add,Sub}.
|
||||
* Fix regression wrt. non-deleted temporary -run executable.
|
||||
* Breaking ABI changes:
|
||||
* extern(D): Pass non-PODs by ref to temporary.
|
||||
* -linkonce-templates comes with a new experimental template
|
||||
emission scheme and is now suited for projects consisting of
|
||||
multiple object files too.
|
||||
- 1.13+ is now required for 1.26+ on 32bit
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 28 18:33:03 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>
|
||||
|
||||
- Update to 1.24.0:
|
||||
Big news
|
||||
* Frontend, druntime and Phobos are at version 2.094.1+, incl. new command-line options -cov=ctfe, -vtemplates=list-instances and -HC=<silent|verbose> . (#3560, #3582, #3588, #3593)
|
||||
* Support for LLVM 11. The prebuilt packages use v11.0.0; x86 packages newly include the LLVM backend for AMD GPUs. (#3546, #3586)
|
||||
* Experimental support for macOS on 64-bit ARM, thanks Guillaume! All druntime/Phobos unit tests pass. The macOS package includes prebuilt druntime/Phobos; adapt the SDK path in etc/ldc2.conf and then use -mtriple=arm64-apple-macos to cross-compile. If you know how to work around the countless linker warnings, please let us know. (dlang/druntime#3226, #3583)
|
||||
Platform support
|
||||
* Supports LLVM 6.0 - 11.0.
|
||||
Bug fixes
|
||||
* Fix potentially wrong context pointers when calling delegate literals. (#3553, #3554)
|
||||
* Fix alignment issue when casting vector rvalue to static array. (c8889a9)
|
||||
* Make sure lambdas in pragma(inline, true) functions are emitted into each referencing compilation unit. (#3570)
|
||||
* Fix -Xcc=-Wl,... by dropping support for comma-separated list of cc options. (c61b135)
|
||||
* Fix ThreadSanitizer support by not detaching main thread upon program termination. (#3572)
|
||||
* Traverse full chain of nested aggregates when resolving a nested variable. (#3556, #3558)
|
||||
Internals
|
||||
* CI: Linux AArch64 is now also tested by a Travis job, because Shippable has sadly become unreliable. (#3469)
|
||||
* Building LDC with an LDC host compiler might be somewhat faster now (requires -DLDC_LINK_MANUALLY=OFF in the CMake command-line on non-Windows hosts). (#3575)
|
||||
Known issues
|
||||
* When building LDC, old LDC 0.17.*/ltsmaster host compilers miscompile LDC ≥ 1.21, leading to potential segfaults of the built LDC. Ltsmaster can still be used to bootstrap a first compiler and then let that compiler compile itself. (#3354)
|
||||
* Buggy older ld.bfd linker versions may wrongly strip out required symbols, e.g., ModuleInfos (so that e.g. no module ctors/dtors are run). LDC defaults to ld.gold on Linux.
|
||||
* 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 25 15:09:09 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Fix aarch64 build: Drop '-mbranch-protection=standard' option
|
||||
as llvm7 does not support it
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 1 09:04:59 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.23.0:
|
||||
Bug news
|
||||
* Frontend, druntime and Phobos are at version 2.093.1+,
|
||||
incl. new command-line option -vtemplates. (#3476, #3538, #3541)
|
||||
* New -platformlib CLI option to override the default linked-with
|
||||
platform libraries, e.g., when targeting bare-metal. (#3374, #3475)
|
||||
Platform support
|
||||
* Supports LLVM 6.0 - 10.0.
|
||||
Bug fixes
|
||||
* Fix regression since v1.22: shared druntime potentially overriding
|
||||
libstdc++ symbols and breaking exceptions in C++ libraries. (#3530, #3537)
|
||||
* Fix naked DMD-style asm emission for non-Mac x86 Darwin targets
|
||||
(e.g., iOS simulators). (#3478)
|
||||
* -betterC: Don't use unsupported EH for handling clean-ups. (#3479, #3482)
|
||||
* dcompute: Fix wrong address space loads and stores. Thx Rob! (#3428)
|
||||
* Fix ICE wrt. missing IR declarations for some forward-declared
|
||||
functions. (#3496, #3503)
|
||||
* Fix ICE wrt. inline IR and empty parameter types tuple. (#3509)
|
||||
* Fix PGO issues. (#3375, #3511, #3512, #3524)
|
||||
* Improve support for LLVM's ThreadSanitizer. (#3522)
|
||||
* Fix linker cmdline length limitation via response files. (#3535, #3536)
|
||||
Internals
|
||||
* Compiler performance wrt. string literals emission has been improved.
|
||||
Thx @looked-at-me! (#3490, #3492)
|
||||
* Link libstdc++ statically for libldc-jit.so of prebuilt Linux packages,
|
||||
to increase portability. (#3473, #3474)
|
||||
* Set up Visual D when using the Visual Studio CMake generator, making
|
||||
LDC compiler development on Windows a smooth out-of-the-box experience. (#3494)
|
||||
Known issues
|
||||
* When building LDC, old LDC 0.17.*/ltsmaster host compilers miscompile
|
||||
LDC ≥ 1.21, leading to potential segfaults of the built LDC. Ltsmaster
|
||||
can still be used to bootstrap a first compiler and then let that compiler
|
||||
compile itself. (#3354)
|
||||
* Buggy older ld.bfd linker versions may wrongly strip out required symbols,
|
||||
e.g., ModuleInfos (so that e.g. no module ctors/dtors are run).
|
||||
LDC defaults to ld.gold on Linux.
|
||||
* 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 9 21:57:52 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>
|
||||
|
||||
- Update to 1.22.0:
|
||||
Big news
|
||||
* Frontend, druntime and Phobos are at version 2.092.1+.
|
||||
(#3413, #3416, #3429, #3434, #3452, #3467) (new)
|
||||
* AArch64: All known ABI issues have been fixed. C(++) interop should now be
|
||||
on par with x86_64, and variadics usable with core.{vararg,stdc.stdarg}.
|
||||
(#3421)
|
||||
* Windows hosts: DMD's Visual C++ toolchain detection has been adopted. As
|
||||
that's orders of magnitude faster than the previous method involving the MS
|
||||
batch file, auto-detection has been enabled by default, so if you have a
|
||||
non-ancient Visual C++ installation, it will now be used automatically for
|
||||
linking. The environment setup has been reduced to the bare minimum
|
||||
(LIB and PATH). (#3415)
|
||||
* FreeBSD x64: CI with CirrusCI is now fully green and includes automated
|
||||
prebuilt package generation. The package depends on the llvm ports package
|
||||
and should currently work on FreeBSD 11-13. (#3453, #3464) (new)
|
||||
* Link-time overridable @weak functions are now emulated for Windows targets
|
||||
and work properly for ELF platforms. For ELF, LDC doesn't emit any COMDATs
|
||||
anymore. (#3424)
|
||||
* New ldc.gccbuiltins_{amdgcn,nvvm} for AMD GCN and NVIDIA PTX targets.
|
||||
(#3411)
|
||||
* druntime: Significant speed-up for core.math.ldexp. (#3440, #3446)
|
||||
Platform support
|
||||
* Supports LLVM 3.9 - 10.0.
|
||||
Bug fixes
|
||||
* Cross-module inlining (incl. pragma(inline, true)): Enable emission into
|
||||
multiple object files. This may have a significant impact on performance
|
||||
(incl. druntime/Phobos) when not using LTO. (#3126, #3442)
|
||||
* Android: Fix TLS initialization regression (introduced in v1.21) and
|
||||
potential alignment issues. Unfortunately, the ld.bfd linker is required
|
||||
for our custom TLS emulation scheme, unless you're willing to use a custom
|
||||
linker script. So -linker=bfd is the new default for Android targets.
|
||||
(#3462) (new)
|
||||
* Casting (static and dynamic) arrays to vectors now loads the data instead
|
||||
of splatting the first element. (#3418, #3419)
|
||||
* Fix return statements potentially accessing memory from destructed
|
||||
temporaries. (#3426)
|
||||
* Add proper support for -checkaction=halt. (#3430, #3431)
|
||||
* druntime: Include core.stdcpp.* modules. (#3103, #3158)
|
||||
* GCC-style asm: Add support for indirect input operands ("m"). (#3438)
|
||||
* FreeBSD: Fix backtraces for optimized code by switching to external
|
||||
libexecinfo. (#3108, #3453)
|
||||
* FreeBSD: Fix C math related issues (incl. CTFE math issues) by bringing
|
||||
core.stdc.{math,tgmath} up to speed. (dlang/druntime#3119)
|
||||
* Fix ICE for captured parameters not passed on the LLVM level. (#3441)
|
||||
* Convenience fixes for RISC-V and other exotic targets. (#3457, #3460) (new)
|
||||
Internals
|
||||
* When printing compile-time reals to hex strings (mangling, .di headers),
|
||||
LDC now uses LLVM instead of the host C runtime, for proper and consistent
|
||||
results. (#3410)
|
||||
* One limitation for exotic hosts wrt. C long double precision has been
|
||||
lifted. (#3414)
|
||||
* For AVR targets, the compiler now predefines AVR and emits all TLS globals
|
||||
as regular __gshared ones. (#3420)
|
||||
* WebAssembly: New memory grow/size intrinsics. (ldc-developers/druntime#187)
|
||||
(new)
|
||||
* New -fno-plt option to avoid PLT external calls. (#3443)
|
||||
* iOS/arm64 CI, running the debug druntime & Phobos unittests on an iPhone
|
||||
6S. Thx Jacob for this tedious work! (#3379, #3450)
|
||||
Known issues
|
||||
* When building LDC, old LDC 0.17.*/ltsmaster host compilers miscompile LDC ≥
|
||||
1.21, leading to potential segfaults of the built LDC. Ltsmaster can still
|
||||
be used to bootstrap a first compiler and then let that compiler compile
|
||||
itself. (#3354)
|
||||
* Buggy older ld.bfd linker versions may wrongly strip out required symbols,
|
||||
e.g., ModuleInfos (so that e.g. no module ctors/dtors are run). LDC
|
||||
defaults to ld.gold on Linux.
|
||||
* 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 1 09:09:31 UTC 2020 - Max Lin <mlin@suse.com>
|
||||
|
||||
- Switch to llvm7 explicity on Leap 15.2 as the default llvm in Leap 15.2
|
||||
isn't llvm7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 24 22:00:42 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>
|
||||
|
||||
- Remove groups from specfile since they are not used anymore
|
||||
- Add ldc-jit lib and devel packages
|
||||
- Update to 1.21.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.091.1+, incl. new CLI
|
||||
switches -verror-style and -HC, -HCd, -HCf. (#3333, #3399)
|
||||
- LLVM for prebuilt packages upgraded to v10.0.0. Android NDK version
|
||||
bumped to r21. (#3307, #3387, #3398)
|
||||
- Initial support for GCC/GDC-style inline assembly syntax, besides
|
||||
DMD-style inline asm and LDC-specific __asm, enabling to write inline
|
||||
asm that is portable across GDC/LDC and corresponds to the GCC syntax
|
||||
in C. See ldc-developers/druntime#171 for examples wrt. how to
|
||||
transition from __asm to similar GCC-style asm. (#3304)
|
||||
- Inline assembly diagnostics have been extended by the D source
|
||||
location. (#3339)
|
||||
* Platform support
|
||||
- Supports LLVM 3.9 - 10.0.
|
||||
* Bug fixes
|
||||
- Fixed tail calls in thunks, affecting AArch64 (the debug libraries now work)
|
||||
and possibly other architectures. (#3329, #3332)
|
||||
- Windows: Do not emit any column infos for CodeView by default
|
||||
(like clang) & add -gcolumn-info. (#3102, #3388)
|
||||
- Windows: Do not leak MSVC-environment-setup into -run child processes.
|
||||
A new LDC_VSDIR_FORCE environment variable can be used to enforce MSVC
|
||||
toolchain setup. (#3340, #3341)
|
||||
- Windows: Fix memory leak when throwing exceptions in threads.
|
||||
(#3369, ldc-developers/druntime#181)
|
||||
- Try to use memcmp for (in)equality of non-mutable static arrays and
|
||||
mutable slices. (#3400, #3401)
|
||||
- ldc.gccbuiltins_*: Lift 256-bit vector limit, adding 174 AVX512
|
||||
builtins for x86; 512-bit vector aliases have been added to core.simd.
|
||||
(#3405, #3406)
|
||||
* Internals
|
||||
- core.bitop.{bts,btr,btc} are now CTFE-able. (ldc-developers/druntime#182)
|
||||
- Do not fallback to host for critical section size of unknown targets.
|
||||
(#3389)
|
||||
- Linux: Possibility to avoid passing -fuse-ld to cc via -linker=.
|
||||
(#3382)
|
||||
- WebAssembly: Switch from legacy linked-list ModuleInfo registry to
|
||||
__minfo section. (#3348)
|
||||
- Windows: Bundled libcurl upgraded to v7.69.1, incl. the option to link
|
||||
it statically. (#3378)
|
||||
- Windows: Switch to wide wmain C entry point in druntime. (#3351)
|
||||
- druntime unittests are now compiled with -checkaction=context.
|
||||
* Known issues
|
||||
- NEW: When building LDC, old LDC 0.17.*/ltsmaster host compilers
|
||||
miscompile LDC ≥ 1.21, leading to potential segfaults of the built LDC.
|
||||
Ltsmaster can still be used to bootstrap a first compiler and then let
|
||||
that compiler compile itself. (#3354)
|
||||
- Buggy older ld.bfd linker versions may wrongly strip out required
|
||||
symbols, e.g., ModuleInfos (so that e.g. no module ctors/dtors are run).
|
||||
LDC defaults to ld.gold on Linux.
|
||||
- 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.
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 9 14:48:29 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Switch to llvm7 for Tumbleweed as llvm8 is not able to build
|
||||
bootstrap version 0.17.6
|
||||
See https://github.com/ldc-developers/ldc/issues/3109
|
||||
- Disable -flto=4 option as llvm does not recognize this option
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 9 12:43:24 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.16.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.086.1, incl.
|
||||
a DIP1008 fix. (#3062, #3076, #3091) (new)
|
||||
- Non-Windows x86: Faster real versions of std.math.{tan,expi}. (#2855)
|
||||
- dcompute: New __traits(getTargetInfo, "dcomputeTargets"). (#3090) (new)
|
||||
* Platform support
|
||||
- Supports LLVM 3.9 - 8.0 (incl. 7.1).
|
||||
* Bug fixes
|
||||
- Make pragma(LDC_no_typeinfo) actually elide TypeInfo emission
|
||||
for structs, classes and interfaces. (#3068)
|
||||
- Windows: Fix DLL entry point in MinGW-based libs.
|
||||
(ldc-developers/mingw-w64-libs@8d930c1)
|
||||
- WebAssembly: Use --export-dynamic when linking with LLD 8+.
|
||||
(#3023, #3072)
|
||||
- Fix corrupt this in functions nested in in/out contracts.
|
||||
(45460a1)
|
||||
- Fix identity comparisons of integral vectors. (a44c78f)
|
||||
- Improved handling of unsupported vector ops. (a44c78f)
|
||||
- uClibc: Fix C assert calls. (#3078, #3082) (new)
|
||||
- Improved error message on global variable collision.
|
||||
(#3080, #3081) (new)
|
||||
* Known issues
|
||||
- Buggy older ld.bfd linker versions may wrongly strip out
|
||||
required symbols, e.g., ModuleInfos (so that e.g. no module
|
||||
ctors/dtors are run). LDC defaults to ld.gold on Linux.
|
||||
- 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 20 21:04:20 UTC 2019 - Matthias Eliasson <elimat@opensuse.org>
|
||||
|
||||
- Update to 1.15.0
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.085.1, incl. new
|
||||
command-line options -preview, -revert, -checkaction=context,
|
||||
-verrors-context and -extern-std. (#3003, #3039, #3053) (new)
|
||||
+ The Objective-C improvements from DMD 2.085 are not implemented
|
||||
(#3007)
|
||||
- Support for LLVM 8.0. The prebuilt packages have been upgraded to
|
||||
LLVM 8.0.0 and include the Khronos SPIRV-LLVM-Translator, so that
|
||||
dcompute can now emit OpenCL too. (#3005)
|
||||
- Compiler memory requirements can now be reduced via the new -lowmem
|
||||
switch, which enables the garbage collector for the front-end and
|
||||
sacrifices compile times for less required memory. In some cases, the
|
||||
overall max process memory can be reduced by more than 60%; see #2916
|
||||
(comment) for some numbers. (#2916)
|
||||
+ Note for package maintainers: this feature requires a recent D host
|
||||
compiler (most notably, it doesn't work with ltsmaster), ideally
|
||||
LDC 1.15 itself due to important GC memory overhead improvements in
|
||||
2.085 druntime.
|
||||
- Support for generic @llvmAttr("name") parameter UDAs, incl. new
|
||||
@restrict with C-like semantics. (#3043) (new)
|
||||
- macOS: 32-bit support was dropped in the sense of not being CI-tested
|
||||
anymore and the prebuilt macOS package now containing x86_64 libraries
|
||||
only. MACOSX_DEPLOYMENT_TARGET for the prebuilt package has been raised
|
||||
from 10.8 to 10.9.
|
||||
- Prebuilt packages don't depend on libtinfo and libedit anymore.
|
||||
(#1827, #3019)
|
||||
- x86: SSSE3 isn't required for the prebuilt packages and generated
|
||||
optimized binaries anymore. (#3045) (new)
|
||||
* Platform support
|
||||
- Supports LLVM 3.9 - 8.0.
|
||||
* Bug fixes
|
||||
- Implicit cross-module-inlining of functions annotated with
|
||||
pragma(inline, true) without explicit -enable-cross-module-inlining has
|
||||
been restored. (#2552, #3014)
|
||||
- Propagate well-known length of newly allocated dynamic arrays for
|
||||
better optimizability. (#3041, #3042) (new)
|
||||
- JIT: Support implicit __chkstk calls for Windows targets, e.g., for
|
||||
large stack allocations. (#3051) (new)
|
||||
- Update so_version to 85
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 25 10:14:01 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Requires binutils.gold as ldc uses ld.gold by default since version 1.13.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 21 09:31:49 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Enable bootstrap again for all flavours, otherwise ldc will require old
|
||||
.so file instead of new one
|
||||
- Use ldc 1.12.0 as intermediate build on 32-bit, due to upstream bug:
|
||||
* https://github.com/ldc-developers/ldc/issues/2947
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 10 14:00:36 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Remove wrong requires to 'ldc-utils' as there is no such package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 18 13:19:42 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Disable bootstrap in Tumbleweed and Leap 15+ as it is bootstrapped already
|
||||
and to workaround https://github.com/ldc-developers/ldc/issues/2947
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 18 13:01:16 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Add bash-completion sub-package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 18 12:11:21 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.13.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.083.1.
|
||||
(#2878, #2893, #2920, #2933) (new)
|
||||
- The Windows packages are now fully self-sufficient, i.e., a
|
||||
Visual Studio/C++ Build Tools installation isn't required anymore,
|
||||
as we now ship with MinGW-w64-based libraries, similar to DMD. Check out
|
||||
the included README.txt for all relevant details.
|
||||
(dlang/installer#346, #2886, Wiki: Cross-compiling with LDC)
|
||||
- Debug info improvements:
|
||||
- For GDB: printing global and imported symbols, non-member
|
||||
and member function calls. (#2826)
|
||||
- For Visual Studio and mago: names, by-value params, nested
|
||||
variables. (#2895, #2908, #2909, #2912)
|
||||
- Associative arrays now showing up properly (at least with mago),
|
||||
not as opaque void* anymore. (#2869)
|
||||
- -gc now translates D names to C++ ones, e.g., to use the regular
|
||||
Visual Studio debugger (bypassing mago) and as preparation for VS Code
|
||||
debugging with Microsoft's C/C++ plug-in (screenshots). Thanks to
|
||||
Oleksandr for this contribution and the AA fix! (#2869)
|
||||
- New command-line option -fvisibility=hidden to hide functions/globals
|
||||
not marked as export (for non-Windows targets), primarily to reduce the
|
||||
size of shared libraries. Thanks to Andrey for stepping up! (#2894, #2923)
|
||||
- Dropped support for LLVM 3.7 and 3.8. (#2872)
|
||||
- LLVM for prebuilt packages upgraded to v7.0.1. (new)
|
||||
- Linux: now defaulting to ld.gold linker in general, not just with
|
||||
-flto=thin, as buggy older ld.bfd versions may wrongly strip out required
|
||||
symbols (change with -linker). (#2870)
|
||||
- Improved support for Android/x86[_64], musl libc and FreeBSD/AArch64.
|
||||
(#2917, ldc-developers/druntime#146) (new)
|
||||
- LDC-specific druntime: ldc.simd.inlineIR moved/renamed to ldc.llvmasm.__ir
|
||||
(with deprecated legacy alias). (#2931) (new)
|
||||
- New CMake option COMPILE_D_MODULES_SEPARATELY builds D files in the DDMD
|
||||
frontend separately to reduce the time required to build LDC with many
|
||||
CPU cores and/or for iterative development. (#2914)
|
||||
* Platform support
|
||||
- Supports LLVM 3.9 - 7.0.
|
||||
- Alpine linux/x64: built against Musl libc to support Docker images based on
|
||||
the Alpine distro, requires the llvm5-libs, musl-dev, binutils-gold and gcc
|
||||
packages to build and link D apps and the tzdata and curl-dev packages for
|
||||
certain stdlib modules.
|
||||
* Bug fixes
|
||||
- 32-bit Android/ARM regression introduced in v1.12. (#2892)
|
||||
- Non-Windows x86_64 ABI fixes wrt. what's passed in registers,
|
||||
relevant for C[++] interop. (#2864)
|
||||
- Some issues with beta1's newly bundled Windows libraries. (#2900, #2903)
|
||||
- Alignment of scope allocated class instances. (#2919)
|
||||
- Beta2's -fvisibility=hidden causing lots of linker errors.
|
||||
(#2922, #2923) (new)
|
||||
- Update so_version to 83
|
||||
- Disable ppc64 builds (boo#1113531)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 17 09:54:24 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Update to 1.12.0:
|
||||
* Big news
|
||||
- Frontend, druntime and Phobos are at version 2.082.1.
|
||||
(#2818, #2837, #2858, #2873) (new)
|
||||
Significant performance improvements for some transcendental
|
||||
std.math functions in single and double precision, at least
|
||||
for x86. (dlang/phobos#6272 (comment))
|
||||
- Support for LLVM 7, which is used for the prebuilt packages.
|
||||
Due to an LLVM 7.0.0 regression, the prebuilt x86[_64] LDC
|
||||
binaries require a CPU with SSSE3, and so will your optimized
|
||||
binaries (unless compiling with -mattr=-ssse3). (#2850)
|
||||
- JIT compilation: new ldc.dynamic_compile.bind function with
|
||||
interface similar to C++ std::bind, allowing to generate
|
||||
efficient specialized versions of functions (much like
|
||||
Easy::jit for C++). (#2726)
|
||||
- LTO now working for Win64 too; the prebuilt package includes
|
||||
the required external LLD linker and the optional LTO default
|
||||
libs. Enable as usual with -flto=<thin|full>
|
||||
[-defaultlib=druntime-ldc-lto,phobos2-ldc-lto]. (#2774)
|
||||
- Config file: new lib-dirs array for directories to be searched
|
||||
for libraries, incl. LLVM compiler-rt libraries. (#2790)
|
||||
* Platform support
|
||||
- Supports LLVM 3.7 - 7.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.
|
||||
- Android/ARM: This release slightly changes the way emulated TLS
|
||||
is interfaced, but is missing a patch for 32-bit ARM. See the
|
||||
wiki for instructions on patching that file manually before
|
||||
cross-compiling the runtime libraries for 32-bit Android/ARM.
|
||||
* Bug fixes
|
||||
- Fix IR-based PGO on Windows (requires our LLVM fork). (#2539)
|
||||
- Fix C++ class construction with D new on Posix. (#2801)
|
||||
- Android: No more text relocations in Phobos zlib, required for
|
||||
API level 23+. (#2822, #2835)
|
||||
- Declare extern const/immutable globals as IR constants.
|
||||
(#2849, #2852)
|
||||
- Fix issue when emitting both object and textual assembly files
|
||||
at once (-output-o -output-s). (#2847)
|
||||
- Support address of struct member as key/value in AA literal.
|
||||
(#2859, #2860)
|
||||
- Fix ICE when computing addresses relative to functions/labels.
|
||||
(#2865, #2867) (new)
|
||||
- beta2 regression wrt. cross-compiling to Android. (#2863) (new)
|
||||
- Fix so_version to 82
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 06:56:16 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Fix so_version to 81
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 24 10:24:47 UTC 2018 - guillaume@opensuse.org
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 30 09:55:27 UTC 2018 - matthias.eliasson@gmail.com
|
||||
|
||||
- Remove _sysconfdir from phobos-devel filelist and add etc since its a
|
||||
d package name. spec-cleaner was to eager to clean.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 28 14:03:46 UTC 2018 - matthias.eliasson@gmail.com
|
||||
|
||||
- Update so_ver to 80 for libdruntime-ldc and libphobos2-ldc to
|
||||
match version in 1.10.0 release of ldc.
|
||||
- Run spec-cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 3 06:40:16 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Update to 1.10.0:
|
||||
* Big news:
|
||||
- Frontend, druntime and Phobos are at version 2.080.1.
|
||||
(#2665, #2719, #2737) (new)
|
||||
- No support for Objective-C class/static methods yet. (#2670)
|
||||
- Breaking Win64 extern(D) ABI change: Pass vectors directly
|
||||
in registers, analogous to the MS vector calling convention.
|
||||
(#2714)
|
||||
- Config file: For cross-compilation, support additional
|
||||
sections named as regex for specific target triples, e.g.,
|
||||
"86(_64)?-.*-linux": { … };; see the comment in etc/ldc2.conf.
|
||||
(#2718)
|
||||
* 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 run and link D apps and the
|
||||
tzdata and libcurl packages for certain stdlib modules.
|
||||
* Bug fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 6 11:33:49 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Add tests, disabled by default (since we are missing python2-lit)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 6 08:15:36 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Add patch to fix ARM builds:
|
||||
* ldc-1.9.0-fix_arm_build.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 5 16:08:35 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Update to 1.9.0 and use 0.17.5 to bootstrap
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 1 12:11:13 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- Add patch to fix rpmlint error:
|
||||
* ldc-0.17.5-add_missing_include.patch
|
||||
- Add patches to add LLVM6 support:
|
||||
* ldc-0.17.5-add_support_to_LLVM6.patch
|
||||
* ldc-0.17.5-backport_pr_2315.patch
|
||||
- Add patch to be able to use ldc:
|
||||
* ldc-0.17.5-default-to-pic.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 22 10:05:09 UTC 2018 - guillaume.gardet@opensuse.org
|
||||
|
||||
- update to version 0.17.5:
|
||||
* Added LLVM 5.0 support.
|
||||
* druntime: fixes for Android and addition of core.math.yl2x[p1]() for x86(_64) targets.
|
||||
* dmd-testsuite: backported runnable/cppa.d fix for GCC > 5.
|
||||
* CI updates.
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 9 08:54:07 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Rectify RPM groups
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 29 19:50:03 UTC 2017 - mailaender@opensuse.org
|
||||
|
||||
- update to version 0.17.4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 26 19:56:33 UTC 2017 - mailaender@opensuse.org
|
||||
|
||||
- update to version 0.17.3
|
||||
- https://en.opensuse.org/SourceUrls
|
||||
- drop workaround-buggy-llvm-config.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 15 15:47:39 UTC 2016 - schuetzm@gmx.net
|
||||
|
||||
- update to 0.17.0
|
||||
- based on DMD 2.068.2
|
||||
- more information here:
|
||||
https://github.com/ldc-developers/ldc/releases/tag/v0.17.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 6 20:08:34 UTC 2015 - rpm@fthiessen.de
|
||||
|
||||
- Build runtime and phobos libraries as shared libraries, therefore
|
||||
refactored spec file:
|
||||
* Basic cleanup
|
||||
* Split lib* packages, see openSUSE shared library policy
|
||||
* Added ldc-rpmlintrc for false positiv.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 28 11:02:24 UTC 2015 - schuetzm@gmx.net
|
||||
|
||||
- update to 0.16.1
|
||||
- this is a bugfix only release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 24 11:29:29 UTC 2015 - schuetzm@gmx.net
|
||||
|
||||
- update 0.16.0
|
||||
- based on DMD 2.067.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 22 16:15:02 UTC 2015 - schuetzm@gmx.net
|
||||
|
||||
- initial submission based on Duncan Mac-Vicar's work
|
||||
|
324
ldc.spec
Normal file
324
ldc.spec
Normal file
@ -0,0 +1,324 @@
|
||||
#
|
||||
# spec file for package ldc
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define so_ver 109
|
||||
%define lname_jit libldc-jit
|
||||
%define lname_runtime libdruntime-%{name}
|
||||
%define lname_phobos libphobos2-%{name}
|
||||
%define _bashcompletionsdir %{_datadir}/bash-completion/completions
|
||||
|
||||
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||
%ifarch ppc
|
||||
%define LDCDIST powerpc64-suse-linux
|
||||
%else
|
||||
%ifarch %sparc
|
||||
%define LDCDIST sparc64-suse-linux
|
||||
%else
|
||||
%ifarch %arm
|
||||
%define LDCDIST %{HOST_ARCH}-suse-linux-gnueabi
|
||||
%else
|
||||
%define LDCDIST %{HOST_ARCH}-suse-linux
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define ldcincludedir %{_libdir}/ldc/%{LDCDIST}/include/d
|
||||
|
||||
# With bootstrap enabled (the default), gdc is used (through the gdmd wrapper)
|
||||
# to build ldc (and shared runtime), then the built ldc is used to build ldc
|
||||
# itself again. The final ldc with shared runtime is then installed.
|
||||
# With bootstrap disabled, ldc from the ldc package is used directly to build
|
||||
# the new ldc. Note that the resulting ldc is linked against the old ldc's
|
||||
# runtime, which might not be compatible with the newly built one!
|
||||
%bcond_without ldc_bootstrap
|
||||
|
||||
%bcond_with ldc_tests
|
||||
|
||||
# Dynamic compiling is not supported with LLVM >= 12
|
||||
# https://github.com/ldc-developers/ldc/issues/3747
|
||||
%global jit_support 0
|
||||
|
||||
# LLVM LTO is too much for 32bit ARM
|
||||
%ifarch %{arm}
|
||||
%define _lto_cflags %nil
|
||||
%endif
|
||||
|
||||
Name: ldc
|
||||
Version: 1.39.0
|
||||
Release: 0
|
||||
Summary: The LLVM D Compiler
|
||||
License: Artistic-1.0 AND BSD-3-Clause
|
||||
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
|
||||
%if 0%{?suse_version} > 1550 || ( 0%{?is_opensuse} && 0%{?sle_version} > 150400 )
|
||||
BuildRequires: llvm-clang >= 15.0
|
||||
BuildRequires: llvm-devel >= 15.0
|
||||
%else
|
||||
BuildRequires: llvm-clang >= 15.0
|
||||
BuildRequires: llvm-devel >= 15.0
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(bash-completion)
|
||||
# Should be installed, at least runtime
|
||||
Recommends: ldc-phobos-devel = %{version}
|
||||
Recommends: ldc-jit-devel = %{version}
|
||||
Recommends: ldc-runtime-devel = %{version}
|
||||
%if %{with ldc_bootstrap}
|
||||
# Use GDC 10, available on 15.3+
|
||||
%if 0%{?suse_version} < 1550
|
||||
%global gdc_version 10
|
||||
%global gdc_suffix -%{gdc_version}
|
||||
%endif
|
||||
# Clang uses the newest gcc to find headers and libs
|
||||
BuildRequires: gcc%{?gdc_version}-c++
|
||||
BuildRequires: gdmd%{?gdc_suffix}
|
||||
%else
|
||||
BuildRequires: ldc
|
||||
BuildRequires: ldc-phobos-devel
|
||||
BuildRequires: ldc-runtime-devel
|
||||
%endif
|
||||
%if %{with ldc_tests}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gdb
|
||||
BuildRequires: python
|
||||
BuildRequires: timezone
|
||||
BuildRequires: unzip
|
||||
%endif
|
||||
# ppc64 is disabled due to boo#1113531
|
||||
ExclusiveArch: %{ix86} x86_64 %arm aarch64 riscv64
|
||||
|
||||
%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}
|
||||
# library version 99 wrongly packaged an unversioned file %{_libdir}/ldc_rt.dso.o
|
||||
Conflicts: %{lname_runtime}99
|
||||
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 -n %{lname_jit}%{so_ver}
|
||||
Summary: The LDC jit library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{lname_jit}%{so_ver}
|
||||
This package includes ldc's jit library.
|
||||
|
||||
%package jit-devel
|
||||
Summary: Development files for the D standard library
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{lname_jit}%{so_ver} = %{version}
|
||||
|
||||
%description jit-devel
|
||||
This package contains the LDC jit development files.
|
||||
|
||||
%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.
|
||||
|
||||
%package bash-completion
|
||||
Summary: LDC Bash completion
|
||||
Requires: %{name}
|
||||
Requires: bash-completion
|
||||
Supplements: (%{name} and bash-completion)
|
||||
|
||||
%description bash-completion
|
||||
Optional dependency offering bash completion for ldc2
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ldc-%{version}-src
|
||||
|
||||
%build
|
||||
%if %{with ldc_bootstrap}
|
||||
# Work around gdc bug with stdin (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105544)
|
||||
echo "pragma(msg, int(__VERSION__));" > feVer.d
|
||||
sed -i "s# - -o-# \"$PWD/feVer.d\" -o-#" cmake/Modules/FindDCompiler.cmake
|
||||
|
||||
%define __builddir build-bootstrap
|
||||
|
||||
#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 \
|
||||
%if 0%{?suse_version} > 1550 || ( 0%{?is_opensuse} && 0%{?sle_version} > 150400 )
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
||||
%else
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
||||
%endif
|
||||
-DINCLUDE_INSTALL_DIR:PATH=%{ldcincludedir} \
|
||||
-DD_COMPILER:PATH=%{_bindir}/gdmd%{?gdc_suffix} \
|
||||
-DCMAKE_CXX_FLAGS="-std=c++11"
|
||||
%make_build
|
||||
# The bootstrap compiler is used in-place instead of installed and will
|
||||
# thus set an rpath on generated executables. The next/final stage will be
|
||||
# installed and should use its own libs, so explicitly disable the rpath.
|
||||
sed -i '/rpath/d' bin/ldc2.conf
|
||||
export LD_LIBRARY_PATH="$PWD/%_lib"
|
||||
cd ..
|
||||
|
||||
%define __builddir build
|
||||
%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 \
|
||||
%if 0%{?suse_version} > 1550 || ( 0%{?is_opensuse} && 0%{?sle_version} > 150400 )
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
||||
%else
|
||||
-DCMAKE_C_COMPILER="%{_bindir}/clang" \
|
||||
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
|
||||
%endif
|
||||
-DINCLUDE_INSTALL_DIR:PATH=%{ldcincludedir} \
|
||||
%if %{with ldc_bootstrap}
|
||||
-DD_COMPILER:PATH=$PWD/../build-bootstrap/bin/ldmd2 \
|
||||
%endif
|
||||
-DCMAKE_CXX_FLAGS="-std=c++11"
|
||||
%make_build
|
||||
|
||||
%if %{with ldc_tests}
|
||||
%check
|
||||
pushd build/
|
||||
# Make sure it can find its own libs
|
||||
export LD_LIBRARY_PATH="$PWD/%_lib"
|
||||
%make_build test
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
# Install bash completion in the right folder
|
||||
if [ ! -d %{buildroot}%{_bashcompletionsdir} ]; then
|
||||
install -d %{buildroot}%{_bashcompletionsdir}
|
||||
mv %{buildroot}%{_sysconfdir}/bash_completion.d/ldc2 %{buildroot}%{_bashcompletionsdir}
|
||||
rmdir %{buildroot}%{_sysconfdir}/bash_completion.d/
|
||||
fi
|
||||
# Make sure it can find its own libs (help2man runs the binaries)
|
||||
export LD_LIBRARY_PATH="$PWD/build/%_lib"
|
||||
# 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}%{_prefix}/lib/debug
|
||||
|
||||
%post -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
||||
%post -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
||||
%post -n %{lname_jit}%{so_ver} -p /sbin/ldconfig
|
||||
%postun -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig
|
||||
%postun -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig
|
||||
%postun -n %{lname_jit}%{so_ver} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_mandir}/man1/*.1%{?ext_man}
|
||||
%config %{_sysconfdir}/ldc2.conf
|
||||
%{_bindir}/ldc*
|
||||
%{_bindir}/ldmd2
|
||||
%{_bindir}/timetrace2txt
|
||||
|
||||
%files -n %{lname_runtime}%{so_ver}
|
||||
%{_libdir}/%{lname_runtime}-shared.so.%{so_ver}
|
||||
%{_libdir}/%{lname_runtime}-shared.so.*
|
||||
%{_libdir}/%{lname_runtime}-debug-shared.so.%{so_ver}
|
||||
%{_libdir}/%{lname_runtime}-debug-shared.so.*
|
||||
|
||||
%files runtime-devel
|
||||
%{_libdir}/%{lname_runtime}-shared.so
|
||||
%{_libdir}/%{lname_runtime}-debug-shared.so
|
||||
%{_libdir}/ldc_rt.dso.o
|
||||
%dir %{_libdir}/ldc
|
||||
%dir %{_libdir}/ldc/%{LDCDIST}
|
||||
%dir %{_libdir}/ldc/%{LDCDIST}/include
|
||||
%dir %{ldcincludedir}
|
||||
%{ldcincludedir}/core
|
||||
%{ldcincludedir}/ldc
|
||||
%{ldcincludedir}/__importc_builtins.di
|
||||
%{ldcincludedir}/importc.h
|
||||
%{ldcincludedir}/object.d
|
||||
|
||||
%files -n %{lname_phobos}%{so_ver}
|
||||
%{_libdir}/%{lname_phobos}-shared.so.%{so_ver}
|
||||
%{_libdir}/%{lname_phobos}-shared.so.*
|
||||
%{_libdir}/%{lname_phobos}-debug-shared.so.%{so_ver}
|
||||
%{_libdir}/%{lname_phobos}-debug-shared.so.*
|
||||
|
||||
%if %jit_support
|
||||
%files -n %{lname_jit}%{so_ver}
|
||||
%{_libdir}/%{lname_jit}.so.%{so_ver}
|
||||
%{_libdir}/%{lname_jit}.so.*
|
||||
|
||||
%files jit-devel
|
||||
%{_libdir}/%{lname_jit}-rt.a
|
||||
%{_libdir}/%{lname_jit}.so
|
||||
%endif
|
||||
|
||||
%files phobos-devel
|
||||
%{_libdir}/%{lname_phobos}-shared.so
|
||||
%{_libdir}/%{lname_phobos}-debug-shared.so
|
||||
%{ldcincludedir}%{_sysconfdir}
|
||||
%{ldcincludedir}/std
|
||||
|
||||
%files bash-completion
|
||||
%dir %{_datadir}/bash-completion
|
||||
%dir %{_datadir}/bash-completion/completions
|
||||
%{_bashcompletionsdir}/ldc2
|
||||
|
||||
%changelog
|
176
riscv64-default-target.patch
Normal file
176
riscv64-default-target.patch
Normal file
@ -0,0 +1,176 @@
|
||||
From cb33ca6ddcbd4cbcde04fd987cf1965d70ed4f51 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sun, 16 Apr 2023 22:28:41 +0200
|
||||
Subject: [PATCH] Default to rv64gc for hosted riscv64 target
|
||||
|
||||
Also select the correct ABI by default matching the enabled features
|
||||
(double, float or no floating point).
|
||||
|
||||
Fixes #4375
|
||||
---
|
||||
CHANGELOG.md | 1 +
|
||||
driver/targetmachine.cpp | 41 ++++++++++++++++++++++++++++++++++-----
|
||||
driver/targetmachine.h | 5 ++++-
|
||||
driver/tool.cpp | 6 +++---
|
||||
tests/driver/riscv_abi4.d | 6 ++++++
|
||||
tests/driver/riscv_abi5.d | 6 ++++++
|
||||
6 files changed, 56 insertions(+), 9 deletions(-)
|
||||
create mode 100644 tests/driver/riscv_abi4.d
|
||||
create mode 100644 tests/driver/riscv_abi5.d
|
||||
|
||||
diff --git a/driver/targetmachine.cpp b/driver/targetmachine.cpp
|
||||
index 3f16e20813..74f9efbc06 100644
|
||||
--- a/driver/targetmachine.cpp
|
||||
+++ b/driver/targetmachine.cpp
|
||||
@@ -57,7 +57,7 @@ static llvm::cl::opt<bool, true> preserveDwarfLineSection(
|
||||
llvm::cl::init(false));
|
||||
#endif
|
||||
|
||||
-const char *getABI(const llvm::Triple &triple) {
|
||||
+const char *getABI(const llvm::Triple &triple, const llvm::SmallVector<llvm::StringRef, 8> &features) {
|
||||
llvm::StringRef ABIName(opts::mABI);
|
||||
if (ABIName != "") {
|
||||
switch (triple.getArch()) {
|
||||
@@ -111,6 +111,17 @@ const char *getABI(const llvm::Triple &triple) {
|
||||
ABIName.str().c_str());
|
||||
}
|
||||
|
||||
+ // checks if the features include ±<feature>
|
||||
+ auto hasFeature = [&features](llvm::StringRef feature) {
|
||||
+ for (int i = features.size() - 1; i >= 0; i--) {
|
||||
+ auto f = features[i];
|
||||
+ if (f.substr(1) == feature) {
|
||||
+ return f[0] == '+';
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ };
|
||||
+
|
||||
switch (triple.getArch()) {
|
||||
case llvm::Triple::mips64:
|
||||
case llvm::Triple::mips64el:
|
||||
@@ -120,6 +131,10 @@ const char *getABI(const llvm::Triple &triple) {
|
||||
case llvm::Triple::ppc64le:
|
||||
return "elfv2";
|
||||
case llvm::Triple::riscv64:
|
||||
+ if (hasFeature("d"))
|
||||
+ return "lp64d";
|
||||
+ if (hasFeature("f"))
|
||||
+ return "lp64f";
|
||||
return "lp64";
|
||||
case llvm::Triple::riscv32:
|
||||
return "ilp32";
|
||||
@@ -430,9 +445,13 @@ createTargetMachine(const std::string targetTriple, const std::string arch,
|
||||
|
||||
// checks if the features include ±<feature>
|
||||
auto hasFeature = [&features](llvm::StringRef feature) {
|
||||
- return std::any_of(
|
||||
- features.begin(), features.end(),
|
||||
- [feature](llvm::StringRef f) { return f.substr(1) == feature; });
|
||||
+ for (int i = features.size() - 1; i >= 0; i--) {
|
||||
+ auto f = features[i];
|
||||
+ if (f.substr(1) == feature) {
|
||||
+ return f[0] == '+';
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
};
|
||||
|
||||
// cmpxchg16b is not available on old 64bit CPUs. Enable code generation
|
||||
@@ -441,6 +460,18 @@ createTargetMachine(const std::string targetTriple, const std::string arch,
|
||||
features.push_back("+cx16");
|
||||
}
|
||||
|
||||
+ // For a hosted RISC-V 64-bit target default to rv64gc if nothing has
|
||||
+ // been selected
|
||||
+ if (triple.getArch() == llvm::Triple::riscv64 &&
|
||||
+ triple.getOS() != llvm::Triple::UnknownOS &&
|
||||
+ features.empty()) {
|
||||
+ features.push_back("+m");
|
||||
+ features.push_back("+a");
|
||||
+ features.push_back("+f");
|
||||
+ features.push_back("+d");
|
||||
+ features.push_back("+c");
|
||||
+ }
|
||||
+
|
||||
// Handle cases where LLVM picks wrong default relocModel
|
||||
#if LDC_LLVM_VER >= 1600
|
||||
if (relocModel.has_value()) {}
|
||||
@@ -478,7 +509,7 @@ createTargetMachine(const std::string targetTriple, const std::string arch,
|
||||
opts::InitTargetOptionsFromCodeGenFlags(triple);
|
||||
|
||||
if (targetOptions.MCOptions.ABIName.empty())
|
||||
- targetOptions.MCOptions.ABIName = getABI(triple);
|
||||
+ targetOptions.MCOptions.ABIName = getABI(triple, features);
|
||||
|
||||
if (floatABI == FloatABI::Default) {
|
||||
switch (triple.getArch()) {
|
||||
diff --git a/driver/targetmachine.h b/driver/targetmachine.h
|
||||
index 17e664a2bf..66a84cfd82 100644
|
||||
--- a/driver/targetmachine.h
|
||||
+++ b/driver/targetmachine.h
|
||||
@@ -15,6 +15,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "llvm/ADT/Optional.h"
|
||||
+#include "llvm/ADT/SmallVector.h"
|
||||
+#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/CodeGen.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -73,4 +75,5 @@ MipsABI::Type getMipsABI();
|
||||
const llvm::Target *lookupTarget(const std::string &arch, llvm::Triple &triple,
|
||||
std::string &errorMsg);
|
||||
|
||||
-const char *getABI(const llvm::Triple &triple);
|
||||
+const char *getABI(const llvm::Triple &triple,
|
||||
+ const llvm::SmallVector<llvm::StringRef, 8> &features);
|
||||
diff --git a/driver/tool.cpp b/driver/tool.cpp
|
||||
index 806e365996..cf633499a8 100644
|
||||
--- a/driver/tool.cpp
|
||||
+++ b/driver/tool.cpp
|
||||
@@ -123,14 +123,14 @@ void appendTargetArgsForGcc(std::vector<std::string> &args) {
|
||||
|
||||
case Triple::riscv64:
|
||||
{
|
||||
- std::string mabi = getABI(triple);
|
||||
- args.push_back("-mabi=" + mabi);
|
||||
-
|
||||
extern llvm::TargetMachine* gTargetMachine;
|
||||
auto featuresStr = gTargetMachine->getTargetFeatureString();
|
||||
llvm::SmallVector<llvm::StringRef, 8> features;
|
||||
featuresStr.split(features, ",", -1, false);
|
||||
|
||||
+ std::string mabi = getABI(triple, features);
|
||||
+ args.push_back("-mabi=" + mabi);
|
||||
+
|
||||
// Returns true if 'feature' is enabled and false otherwise. Handles the
|
||||
// case where the feature is specified multiple times ('+m,-m'), and
|
||||
// takes the last occurrence.
|
||||
diff --git a/tests/driver/riscv_abi4.d b/tests/driver/riscv_abi4.d
|
||||
new file mode 100644
|
||||
index 0000000000..a5c93bab61
|
||||
--- /dev/null
|
||||
+++ b/tests/driver/riscv_abi4.d
|
||||
@@ -0,0 +1,6 @@
|
||||
+// REQUIRES: target_RISCV
|
||||
+
|
||||
+// RUN: %ldc %s -mtriple=riscv64-unknown-linux --gcc=echo > %t && FileCheck %s < %t
|
||||
+// CHECK: -mabi=lp64d -march=rv64gc
|
||||
+
|
||||
+void main() {}
|
||||
diff --git a/tests/driver/riscv_abi5.d b/tests/driver/riscv_abi5.d
|
||||
new file mode 100644
|
||||
index 0000000000..11cd97c41c
|
||||
--- /dev/null
|
||||
+++ b/tests/driver/riscv_abi5.d
|
||||
@@ -0,0 +1,6 @@
|
||||
+// REQUIRES: target_RISCV
|
||||
+
|
||||
+// RUN: %ldc %s -mtriple=riscv64-unknown-linux -mattr=+m,+a,+f,-d --gcc=echo > %t && FileCheck %s < %t
|
||||
+// CHECK: -mabi=lp64f -march=rv64imaf_zicsr_zifencei
|
||||
+
|
||||
+void main() {}
|
||||
--
|
||||
2.43.0
|
||||
|
Loading…
Reference in New Issue
Block a user