SHA256
1
0
forked from pool/hare

- Improve build logic.

* fixes version string output
  * no need to run `./scripts/version`
  * set our own cflags and ldflags

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/hare?expand=0&rev=40
This commit is contained in:
Soc Virnyl Estela 2024-08-10 01:05:03 +00:00 committed by Git OBS Bridge
commit 04ed0275ae
9 changed files with 766 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@ -0,0 +1 @@
.osc

4
README-suse-maint.md Normal file
View File

@ -0,0 +1,4 @@
Before submitting hare, always check if harec is up to date in Factory.
Always update harec and submit it to Factory. Wait for it to become part of
Factory before submitting hare.

3
hare-0.24.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc
size 767869

3
hare-0.24.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afba69fd537a63442da53d115d9b50f525918159b395843ede2a5473323e0776
size 912808

8
hare-rpmlintrc Normal file
View File

@ -0,0 +1,8 @@
addFilter("files-duplicate")
addFilter("zero-length")
addFilter("missing-PT_GNU_STACK-section")
addFilter("position-independent-executable-suggested")
addFilter("name-repeated-in-summary")
addFilter("statically-linked-binary")
# Most software do not even respect this
addFilter("filelist-forbidden-fhs23")

553
hare.changes Normal file
View File

@ -0,0 +1,553 @@
-------------------------------------------------------------------
Sat Aug 10 01:04:06 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Improve build logic.
* fixes version string output
* no need to run `./scripts/version`
* set our own cflags and ldflags
-------------------------------------------------------------------
Tue Jul 16 15:31:19 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Remove riscv64-correct-comments.patch
-------------------------------------------------------------------
Tue Jul 16 14:32:27 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Update to version 0.24.2:
This release introduces a lot of breaking changes
* time::date now accepts a zone offset (zoff) parameter in
time::date::reckon and time::date::truncate.
* time::date::calculus has been renamed to time::date::rflag.
* time::date::realize requires .vloc to be set, and no longer defaults
to UTC.
* time::date::now() is renamed to time::date::localnow() and
time::date::nowutc() is renamed to time::date::now()
* time::date::EPOCHAL_JULIAN and EPOCHAL_GREGORIAN have been renamed to
EPOCHDAY_JULIAN and EPOCHDAY_GREGORIAN respectively
* time::chrono::eq has been removed and replaced with
time::chrono::simultaneous and time::chrono::coincident
* time::chrono::mzone has been renamed to time::chrono::ozone
* The type of time::date::parsefail has been chnaged from rune (storing
the offending format specifier) to (size, rune), which adds the index
of the position where the parsing failure occured.
* Several constants for format layouts in time::date have been renamed:
[[EMAILZ]] => [[EMAILZONE]]
[[STAMP_NANO]] => [[STAMPNANO]]
[[STAMP_ZOFF]] => [[STAMPZOFF]]
[[STAMP_ZONE]] => [[STAMPZONE]]
[[STAMP_NOZL]] => [[STAMPLOC]]
* unix::hosts
* unix::passwd
* "done" is now a reserved word and cannot be used in user-defined names
* The following standard library symbols have been updated to use done
types in their API:
* bytes::next_token/bytes::prev_token
* encoding::utf8
* fs::next
* glob::next
* io::EOF
* mime
* path::nextiter
* strings::next/strings::prev
* strings::next_token/strings::prev_token
* In short, if your program matches on a function using the iterator
pattern with "void" and this causes an error from 0.24.2, the
correct solution is likely to rewrite it to use a for-each loop, or
replace "void" with "done" in the relevant match case.
* for-each loops and the "done" type
* Optional parameters for functions
* Support for shared memory and memfds on supported platforms
* Revised and improved APIs for unix::*
* Improved performance for bufio and related APIs
* regex:: now supports multiple alternation (i.e. (x|y|z))
* New cryptography APIs:
* crypto::ec
* crypto::ecdh
* crypto::ecdsa
-------------------------------------------------------------------
Mon May 13 11:03:12 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add riscv64-correct-comments.patch to fix the build on riscv64.
-------------------------------------------------------------------
Sat Feb 17 01:02:16 UTC 2024 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- First pre-release version of hare 0.24.0
* requires qbe 1.2 and harec 0.24.0
-------------------------------------------------------------------
Sat Jan 20 07:25:20 UTC 2024 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to version 1705636831.933763ed:
* OpenBSD: rt add kqueue(2) wrappers
* OpenBSD: rt fix termios structures
* .builds/freebsd.yml drop CC=cc workaround again
* Fix typo in crypto::chachapoly
* strings: Simplify fromutf8
* Makefile: more quoting
* remove harec2 from the makefile all target
* cmd/haredoc: close read end of pipe after passing it to command
* cmd/hare: fix cross-compiling qbe arch
* Advance after zero-length regex matches
* .builds/*: exit on non-master builds
* make bootstrap
* strings: rename pad functions per convention
* strings: improve docs and params for pad functions
* strings: readd pad functions
* time: change signature of *_to_timespec funcs
* notify hare-dev on ci failure
* encoding::utf8: Return invalid from utf8sz on invalid starting byte
* *BSD: fsflags_to_bsd return unsupported instead of abort()
* rt: BPF socket structs & option levels for Linux
* configs/*.mk: don't always assume cross-compilation
* fmt: Fix fmt::mods documentation
* unix::signal: fix typo in docs
* encoding::utf8: Rename valid() to validate() and change return type
* update ci for harec config.mk
-------------------------------------------------------------------
Thu Dec 28 12:11:52 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to version 1703745713.f01c8eed:
* OpenBSD: rt fix munmap system call
* OpenBSD: fix CI
-------------------------------------------------------------------
Sat Dec 23 02:20:15 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to version 1703237889.6c1a836c:
* correct inotify_event to use [*]u8
* make rt/+{arch}/restore.s platform-specific to +linux
* rt/: prepare for IBT support
* strings: Further simplify sub
* os: handle errors on file system iteration
* strconv::stof32 fix doc
- Update specfile
* Always be specific with harec versions. Some hare versions won't
work if harec version is not specified.
-------------------------------------------------------------------
Sat Dec 16 01:10:17 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Add filter to rpmlint
* filelist-forbidden-fhs23
-------------------------------------------------------------------
Sat Dec 16 01:03:47 UTC 2023 - Soc Virnyl Estela <contact@uncomfyhalomacro.pl>
- Move SRCDIR and HAREPATHs to `/usr/src` instead from `/usr/lib`
or `/usr/lib64`. Respect defaults if possible.
- Update to version 1702417101.ce67adb5:
* +libc: Avoid overriding the default linker script on other platforms
* FreeBSD: Fix build with +libc
* os fs.ha: s/errors::errno/fs_to_errno/
* OpenBSD: implement os::mkfifo and os::mkfile
* math: Accept types::signed instead of integer in absi
* cmd/{hare,haredoc}: remove unused imports
* cmd/{hare,haredoc}: Don't allocate tags
* haretype: use system architecture
* os: add arch type and functions
* cmd/haredoc: replace split with rtokenize
* io: improve seek and whence docs
* test: display special msg when no tests are run
* hare deps: print more intuitive msg when no deps
* os+linux: add mkfile
* os+linux: s/Unix/Unix-like/
* haredoc: submodules newline fixes
* hare build: fix order of flags
* getopt: improve docs
* all: always use tabs for indentation
* hare::parse::doc: add docs
* haredoc: error out when more than one arg supplied
* docs: rename hare-doc(5) to haredoc(5)
* os+openbsd: remove extra License: header
* rt+linux: fix some types
* hare::parse: improve assign expr error message
* strings: use type assertion in iter tests
* strings: test contains with no variadic arguments
* strings: test join with only one variadic argument
* strings: test concat with only one argument
* hare::ast: remove inaccurate comment
* path: mention fs::resolve in README
* docs/rfc-template: wrap at 72 columns
* memio+test: use defer for closing streams
* cmd/*: fix memory leaks
* ascii: add strlower_buf and strupper_buf
* hare::parse: disallow mixing @init, @fini, and @test
* hare::ast: s/constant/literal/g
* hare build: only overwrite executable files
* hare::parse+test: add labelled compound test
* hare::*: support for/switch/match labels
* all: update labelled loop syntax
* cmd::hare add comments and cleanup
-------------------------------------------------------------------
Fri Dec 8 14:27:46 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Add README-suse-maint.md
-------------------------------------------------------------------
Fri Dec 8 13:25:24 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Enable checks.
-------------------------------------------------------------------
Fri Dec 08 13:20:23 UTC 2023 - uncomfy+openbuildservice@uncomfyhalomacro.pl
- Update to version 1701969360.dbd2d7a5:
* remove the fs::flag::TRUNC argument from os::create in cmd::hare
* crypto::aes check for AVX before using the native interface
* cmd::hare::build: separate tmpfile from lockfile
* FreeBSD: truncate files on creation by default
* scripts/moddirs: ignore configs/
* OpenBSD: add rt::unveil()
* OpenBSD: add rt::pledge()
* OpenBSD: rt:: sycalls introduce pathbuf1
* OpenBSD: truncate files on creation by default
* OpenBSD: arm64 is called aarch64 in hare
* OpenBSD: rt:: fix readlinkat, renameat
* strconv: Remove base restrictions from doc comment of integertosb
* OpenBSD: os::cpucount: Return the number of online CPUs
-------------------------------------------------------------------
Sat Dec 02 10:19:02 UTC 2023 - uncomfy+openbuildservice@uncomfyhalomacro.pl
- Update specfile
- Update to version 1701471445.901444ae:
* scripts/genbootstrap: reset platformtags
* drop build status from readme
* configs/openbsd.mk remove my local path
* OpenBSD: add .builds/openbsd.yml
* OpenBSD: make bootstrap
* OpenBSD: unix::tty isatty() use fcntl(F_ISATTY)
* OpenBSD: os::exec update for checkless for loops
* MAINTAINERS: add Lorenz (xha) <me@xha.li> to OpenBSD
* OpenBSD: add genbootstrap
* OpenBSD: add net::unix
* OpenBSD: add net::udp
* OpenBSD: add net::tcp
* OpenBSD: add net::ip
* OpenBSD: add net
* OpenBSD: add crypto::random
* OpenBSD: add format::elf
* OpenBSD: add unix::resolveconf
* OpenBSD: add unix::hosts
* OpenBSD: add unix::poll
* OpenBSD: add unix::tty
* OpenBSD: add unix::signal
* OpenBSD: add unix
* OpenBSD: add os::exec
* OpenBSD: add os
* OpenBSD: add time::chrono
* OpenBSD: add time
* OpenBSD: add path
* OpenBSD: add io
* OpenBSD: add rt
* cmd::hare: add OpenBSD
* cmd::hare: introduce ctx.libc
* cmd::hare: introduce platform.ha for adding platform-specific setttings
* remove config.example.mk and add configs/<platform>.mk
* unix::tty: make openpty() platform-specific
* os::exec: make cmdfile platform-specific
* rt: make the signal test platform specific
* rt: make start* and initfini platform-specific
* rt: make linker scripts platform-specific
* cmd::hare arch add comment about values beeing overwritten
* math::complex: clarify isnan behavior
* wordexp: correctly handle string containing only whitespace
* test: hexdump non-printable ASCII
* cmd/hare: fix memory leaks
* bytes: improve tests style and add test
* bytes: replace if expressions with logical and
* bytes: simplify reverse
* strings: simplify ltrim and rtrim
* strings: remove pre-allocation
* strings: improve docstrings
* strings: simplify sub
* strings: remove duplicate allocation in multireplace
* strings: take direction into account in iterstr
* strings: consistently use fromutf8_unsafe
* strings: use static append where applicable
* strings: drop pad functions
* encoding::utf8: operate exclusively on byte slices
* hare cache: exit after printing usage text
* rt: simplify frame-walking functions
* crypto::sha1: document BLOCKSZ
* update for checkless for loops
* fmt: flesh out float formatting
* fmt: add center-alignment
* fmt: factor out format string iterator
* strconv::{ffmt, fflags}: improve default values
* bufio/scanner: fix slice or array access out of bounds
* wordexp: new module
* rt+freebsd fix getpriority
* time::date: add month and weekday constants
* types::c: add unterminatedstr
* unix::tty: Add README
* net::unix: remove unused buf
* linux::keyctl: Add chown and setperm
* io: add dup, dup2 functions
* hare::*: remove unused import forms
-------------------------------------------------------------------
Sat Nov 11 07:36:58 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Minor specfile change
-------------------------------------------------------------------
Fri Nov 10 12:26:57 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- change incorrect license in specfile
- add groups section
-------------------------------------------------------------------
Fri Nov 10 06:52:24 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- adopt new config.mk
-------------------------------------------------------------------
Fri Nov 10 04:15:57 UTC 2023 - uncomfy+openbuildservice@uncomfyhalomacro.pl
- Update to version 1699559089.3d06f9d2:
* speed up crypto::argon2 a bit
* cmd/hare: Improve 'Command not found' error message in get_version
* crypto: use test::skip
* test: implement skip function
* test: disallow expectabort outside @test
* Move string comparison logic to sort::cmp::strs()
* all: style fix
* all: fix test failure memory leaks
* time::chrono: drop unused leapsecs parameter
* cmd/parsechk: initial commit
-------------------------------------------------------------------
Sun Aug 20 15:06:19 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Remove no-exec-stack.patch. Seems it's already in the latest commits
-------------------------------------------------------------------
Sun Aug 20 14:56:03 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Add no-exec-stack.patch
-------------------------------------------------------------------
Sun Aug 20 14:48:25 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to version 0+3206:
* crypto::ed25519: change api to take slices
* drop hare release
* pass -z noexecstack to ld
* Remove unused imports
* rt: remove syscallsarch+*.ha
* s/error/errors/ module name
* net::dns: remove obsolete reference in docs
* net::dns: fix off-by-one in encode_raw
* rt: add IPPROTO_ICMPV6
* strings: rename runes() to torunes()
* io: make io::writeall take const []u8
* MAINTAINERS: Add Conrad Hoffmann
* net::dns: support for basic DNSSEC RR types
* net::dns: support for OPT records (EDNS, RFC 6891)
* rt: fix off-by-one haredocs for AF_* and IPPROTO_*
* memio: truncate on reset()
* os::exec: fix TOCTOU
* os::exec+freebsd: only open() regular files
* rt+freebsd: add fstat, AT_EMPTY_PATH, S_IF*
* net::dns: enforce actual label size restriction
* net::dns: write label terminator in encode_labels
* path: fix capitalization of docstring
* malloc: improve wording in a comment
* cmd/haretype, cmd/ioctlgen: update for memio
* net::dns: add TSIG records and decoding
* net::dns: implement encoding of TXT records
* net::dns: add constants for DNS dynamic updates
* net::dns: retry over TCP on truncated response
* hare::*: remove unary +
* Stop using unary +
* test: reset environment before first test is run
* format::ini: fix and test error line numbering
* mime: fix compilation on +libc
* Don't rely on loose pointer assignability semantics
* strio,bufio: merge memstream implementation into memio
* hare::lex: add static assertion for bmap length
* hare::*: remove implicit const flag from functions
* Remove slices:: and strings::cap
* Use cap builtin
* hare::parse: allow return and yield in more places
* regex: Document when the caller must free the return value
* hare::parse: fix abort in name_list
* hare::parse: improve struct/union/enum comments
* hare::parse+test: add and use roundtrip_reparse
* net/uri: Always prefix path with a slash when there's a host
* math::checked: initial commit
* os::exec: only open() regular files
* bufio: elaborate on docs for scantok and scanline
* hkdf: add extract and expand functions
-------------------------------------------------------------------
Sun Aug 13 13:26:57 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Replace obsoleted `disabled` option with `manual`
-------------------------------------------------------------------
Sat Jul 22 01:51:57 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to 0+3157:
* hare::ast: add README
* math::complex: add README
* hare::unparse: add README
* hare::unparse: add newline between imports and decls
* strconv: append ".0" when float is representable as integer
* strconv: remove zch variable
* strconv: improve error messages
* strconv: recognize - and + in stou*
* types::c: add nulstr
* Correctly convert strconv::base::DEC -> 10
* net::dns: fix opcode bitmask
* hare::parse::identstr: only parse full ident
-------------------------------------------------------------------
Thu Jun 22 12:51:08 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to 0+3145:
Alexey Yerin (3):
net: correct references of net::unix::prepfiles -> allocfiles
os::exec: fill utime and stime
+libc: include empty .init_array section
Armin Preiml (5):
mime: move test entries into a +test file
io::teestream: implement writer
add crypto::chachapoly
crypto: refactor authenc to use crypto::chachapoly
base64: avoid infite loop in decoder
Autumn! (3):
io: move fd-related functions into one file
all: rename 'flags' types to 'flag'
getopt: add subcommand context to errors
Bor Grošelj Simić (3):
rt: update abort for non-constant assert changes in harec
unify fixed and non-fixed abort paths
rt: mark platform_abort as @noreturn
Byron Torres (6):
time::date: new: use virtual interface
time::date: simplify observers
time::date: parse: fix scanners
time::date: add %e; update POSIX layout
time::chrono: fix $TZ causing TZ_LOCAL double-free
time::date: avoid tz() in tests, TZDB dependency
Carlos Une (1):
math::complex::tan: test huge arguments
Conrad Hoffmann (2):
net::dns: add support for PTR records
net::dns: add support for SSHFP records
Dmitry Matveyev (1):
unix::hosts: refactor into more general interface
Drew DeVault (2):
haredoc: set LESS to FRX if unset
docs/maintainers.md: document some maintainer bits
Ember Sawady (17):
Improve test runner
rt: fix platform_abort
rt/abort*.ha: add missing comma in reasons
rt+freebsd: _start: don't touch first arg
rt: update for @noreturn abort
fs+freebsd::readlink: return wrongtype on EINVAL
Improve +libc argv/argc/envp initialization
io+freebsd::fd_copy: return errors::unsupported
Get rid of rt/+test/ztos.ha
Rewrite malloc
linux/*: fix fully-qualified identifiers
hare::parse::want: unlex token on failure
hare::parse::ident: disallow empty identifier
os: add setenv and unsetenv
rt: make errno constants have type rt::errno
io+linux::fd_copy: simplify
Fix chachapoly compilation
Noah Altunian (1):
haredoc: update man page wording to be more clear
Pinghao Wu (1):
crypto::argon2: fix zeroing of h0
Sebastian (21):
os: use libc exit when linking with libc
os: move status type to separate file
hare::ast: add error_assert_expr
rt: implement shutdown
net: implement shutdown
types::c: add strings test
math::random: add assertions that n != 0
all: reorder tagged union fields to put error last
os::exec: split kill into kill and sig
ascii: allocate new string in strupper+strlower
ascii: consistent capitalization in docs
os::exec+freebsd: use unix::signal::signame
rt: fix typo
types::c: add limits
net: remove slices dependency
contributors.sh: read Co-authored-by
contributors.sh: use git ls-tree instead of find
unix::signal: replace signal type with sig enum
types::c: add tostrn and tostrn_unsafe
temp: require mode param for "file" and "named"
regex: add replacen and rawreplacen
Tom Lebreux (1):
bufio: allow borrowedread up to last byte
Vlad-Stefan Harbuz (1):
regex: improve README examples
illiliti (1):
crypto::salsa20: add hsalsa20
-------------------------------------------------------------------
Sun May 28 03:28:04 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Remove checks for now.
-------------------------------------------------------------------
Sat May 27 13:12:29 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Update to 0+3076:
* cmd/haredoc: close read end of pipe later
* time::chrono: use daydate, daytime; improve docs
* time: improve function parameter names
* time::date: rename datetime type to date
* time: rename datetime module in READMEs, docs
* cmd/haretype: fix compilation
* cmd/ioctlgen: fix compilation
* crypto/aes/*.s: use correct per-function sections
* net::unix: replace memcpy with slice assignment
-------------------------------------------------------------------
Mon Mar 20 12:02:54 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Configure LDFLAGS inside config.mk explicitly.
-------------------------------------------------------------------
Mon Mar 20 02:06:13 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Configure CFLAGS inside config.mk.
-------------------------------------------------------------------
Fri Mar 17 12:13:44 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Cleanup specfile
-------------------------------------------------------------------
Wed Mar 1 00:40:34 UTC 2023 - Soc Virnyl Estela <uncomfy+openbuildservice@uncomfyhalomacro.pl>
- Initial spec for hare 0+git2848

146
hare.spec Normal file
View File

@ -0,0 +1,146 @@
#
# spec file for package hare
#
# 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/
#
%bcond_without test
Name: hare
Release: 0
Version: 0.24.2
Summary: Hare system programming language
Group: Development/Tools/Building
License: MPL-2.0
URL: https://harelang.org
Source0: https://git.sr.ht/~sircmpwn/hare/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source2: README-suse-maint.md
BuildRequires: binutils
BuildRequires: gcc
# Hare and the HareC compiler should have the same version
BuildRequires: harec = %{version}
BuildRequires: make
BuildRequires: qbe
BuildRequires: scdoc
BuildRequires: timezone
BuildRequires: zstd
Requires: harec = %{version}
# Hare requires QBE 1.2 like HareC does
Requires: qbe = 1.2
Requires: timezone
%description
Hare is a systems programming language designed
to be simple, stable, and robust. Hare uses a
static type system, manual memory management,
and a minimal runtime. It is well-suited to
writing operating systems, system tools, compilers,
networking software, and other low-level, high
performance tasks
%prep
%autosetup -p1
cat > config.mk <<-SH
## Install configuration
PREFIX = %{_prefix}
BINDIR = %{_bindir}
MANDIR = %{_mandir}
SRCDIR = %{_prefix}/src
STDLIB = %{_prefix}/src/%{name}/stdlib
## Build configuration
# variables used during the build
PLATFORM = linux
ARCH = %{_arch}
HAREFLAGS =
HARECFLAGS = %{optflags}
QBEFLAGS =
ASFLAGS =
LDLINKFLAGS = --gc-sections -z noexecstack
# commands used by the build script
HAREC = harec
HAREFLAGS =
QBE = qbe
AS = as
LD = ld
AR = ar
SCDOC = scdoc
# build locations
HARECACHE = .cache
BINOUT = .bin
# variables that will be embedded in the binary with the -D definitions
HAREPATH = %{_prefix}/src/%{name}/stdlib:%{_prefix}/src/%{name}/third-party
VERSION = %{version}
# Cross-compiler toolchains
AARCH64_AS=as
AARCH64_AR=ar
AARCH64_CC=cc
AARCH64_LD=ld
RISCV64_AS=as
RISCV64_AR=ar
RISCV64_CC=cc
RISCV64_LD=ld
X86_64_AS=as
X86_64_AR=ar
X86_64_CC=cc
X86_64_LD=ld
SH
cp config.mk configs/linux.mk
%build
export CFLAGS="%optflags -fPIE -Wl,-z,noexecstack"
export PLATFORM="linux.%{_arch}"
export ARCH="%{_arch}"
make %{?_smp_mflags}
%install
export CFLAGS="%optflags -fPIE -Wl,-z,noexecstack"
export PLATFORM="linux"
export ARCH="%{_arch}"
make %{?_smp_mflags} DESTDIR="%{buildroot}" install
%if %{with test}
%check
# Enable only for tumbleweed/factory since
# Timezone package seems to fail this :D
%if 0%{?suse_version} > 1600
export CFLAGS="%optflags"
export PLATFORM="linux"
export ARCH="%{_arch}"
make %{?_smp_mflags} check
%endif
%endif
%files
%defattr(-,root,root)
%license COPYING
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}doc
%{_mandir}/man1/*
%{_mandir}/man5/*
%dir %{_prefix}/src/hare
%{_prefix}/src/hare/*
%changelog

View File

@ -0,0 +1,25 @@
From 80e45e4d931a6e90d999846b86471cac00d2a6d5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Wed, 21 Feb 2024 22:05:02 +0100
Subject: [PATCH] debug+riscv: use correct comment syntax
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
debug/+riscv64/getfp.s | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/debug/+riscv64/getfp.s b/debug/+riscv64/getfp.s
index 9c3698af..b822036a 100644
--- a/debug/+riscv64/getfp.s
+++ b/debug/+riscv64/getfp.s
@@ -1,5 +1,5 @@
-// SPDX-License-Identifier: MPL-2.0
-// (c) Hare authors <https://harelang.org>
+# SPDX-License-Identifier: MPL-2.0
+# (c) Hare authors <https://harelang.org>
.section ".text.debug.getfp","ax"
.global debug.getfp
--
2.43.0