scc, branch HEAD simple c99 compiler bbd527058259a2bac5fed45610949b110645e805 2026-06-09T12:23:28Z 2026-06-10T07:26:32Z Make it easier to configure the name of the QBE binary Sören Tempel soeren@soeren-tempel.net commit bbd527058259a2bac5fed45610949b110645e805 parent ab709ce7d4bc60982fa69b0956e58e9330892f2c Author: Sören Tempel <soeren@soeren-tempel.net> Date: Tue, 9 Jun 2026 14:23:28 +0200 Make it easier to configure the name of the QBE binary While it is already possible to configure the as(1) and ld(1) binary name through C macros, the QBE binary name is itself currently hardcoded. However, for distribution following the functional software deployment model (e.g., Guix or Nix), it is useful to also make the name of the QBE binary configurable. This is implemented here through the addition of a QBEBIN macro. ab709ce7d4bc60982fa69b0956e58e9330892f2c 2026-06-09T06:28:42Z 2026-06-09T06:28:42Z cc1: Minor changes in comments Roberto E. Vargas Caballero k0ga@shike2.net commit ab709ce7d4bc60982fa69b0956e58e9330892f2c parent 5a6e26e28744a0fa4efe9f6e032bd40c647b3749 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 9 Jun 2026 08:28:42 +0200 cc1: Minor changes in comments 5a6e26e28744a0fa4efe9f6e032bd40c647b3749 2026-06-03T04:39:45Z 2026-06-05T08:09:30Z cc1: Try parsing specifiers after struct/union/enum Zhaoming Luo zhml@posteo.com commit 5a6e26e28744a0fa4efe9f6e032bd40c647b3749 parent a7a08bb3d51b852995346c96d94265ea936731e5 Author: Zhaoming Luo <zhml@posteo.com> Date: Wed, 3 Jun 2026 04:39:45 +0000 cc1: Try parsing specifiers after struct/union/enum In specifier(), the type is returned after parsing the struct/union/enum specifier. Therefore, the compile will fail with the declaration like: `struct S const s;`. However, according to the syntax of `declaration-specifiers` in c99 spec 6.7, it's accpectable to have other specifiers or qualifiers following the struct/union/enum specifier, which is a type specifier. To follow the c99 spec, continue looking for other specifiers or qualifiers after a struct/union/enum specifier rather than return immediately. a7a08bb3d51b852995346c96d94265ea936731e5 2026-06-05T07:38:00Z 2026-06-05T07:38:00Z tests/cc: Add 0042-struct-enum error test Roberto E. Vargas Caballero k0ga@shike2.net commit a7a08bb3d51b852995346c96d94265ea936731e5 parent 5136c8c992d0d99e593e447a0e74aa79dc50fb18 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 5 Jun 2026 09:38:00 +0200 tests/cc: Add 0042-struct-enum error test This test is marked as TODO because the error recovery mechanism is not working correctly as it was already known. Every of the error conditions of the test were manually tested. 5136c8c992d0d99e593e447a0e74aa79dc50fb18 2026-06-03T09:04:49Z 2026-06-03T09:04:49Z cc1: Fix bug introduced in 15b64d5 Roberto E. Vargas Caballero k0ga@shike2.net commit 5136c8c992d0d99e593e447a0e74aa79dc50fb18 parent 15b64d5d2636103fdeafea92ea7886dbd23c6574 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 3 Jun 2026 11:04:49 +0200 cc1: Fix bug introduced in 15b64d5 The symbol related to the tag is symtag and not sym which ius used later and it is not initialized at this point. Co-authored-by: Zhaoming Luo <zhml@posteo.com> 15b64d5d2636103fdeafea92ea7886dbd23c6574 2026-06-02T11:18:09Z 2026-06-02T13:32:13Z cc1: Error when no struct identifier and '{' Zhaoming Luo zhml@posteo.com commit 15b64d5d2636103fdeafea92ea7886dbd23c6574 parent 5d10a2436b4df6c82723bb7174451ab267512155 Author: Zhaoming Luo <zhml@posteo.com> Date: Tue, 2 Jun 2026 11:18:09 +0000 cc1: Error when no struct identifier and '{' In c99 spec 6.7.2.1.1 `struct-or-union-specifier`, when there is an identifier following `struct-or-union`, it's optional to have `{ struct-declaration-list }` after the identifier; if the identifier does not exist, there must be `{ struct-declaration-list }`. In structdcl(), in the error case where the token after `struct-or-union` is neither an identifier nor '{', a placeholder type is created in newtag() and returned. Compiling 'struct const s { int v; };' gives error message: ``` test.c:1: error: expected ';' before 'const' test.c:1: error: expected ';' before '{' .. test.c:1: error: expected ';' before '{' too many errors ``` Error when the token after `struct-or-union` is neither an identifier nor '{'. The error message will be more understandable: ``` test.c:1: error: unexpected 'const' ``` 5d10a2436b4df6c82723bb7174451ab267512155 2026-06-01T21:08:14Z 2026-06-01T21:08:14Z build/libc: Recover the definition of CPPINCLUDES Roberto E. Vargas Caballero k0ga@shike2.net commit 5d10a2436b4df6c82723bb7174451ab267512155 parent 4db66b3e48d2821ea034c2cc9e233594695872ca Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 1 Jun 2026 23:08:14 +0200 build/libc: Recover the definition of CPPINCLUDES While this definition is not needed anymore because we use scc to build the libc, not having it creates problems in the config-musl configuration, which would try to use the musl headers with the scc libc. Adding these additional -I is odd, but not building the libc in the case of musl creates other problems, because the proto files used in the install target require the different libcs to be built and present in the lib directory. 4db66b3e48d2821ea034c2cc9e233594695872ca 2026-06-01T18:21:08Z 2026-06-01T18:21:08Z doc: Update QBE version to 1.3 Roberto E. Vargas Caballero k0ga@shike2.net commit 4db66b3e48d2821ea034c2cc9e233594695872ca parent cd2e378821e5e5f86215643e87a6b806a8b54492 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 1 Jun 2026 20:21:08 +0200 doc: Update QBE version to 1.3 QBE finally made a release that includes the common storeage and we don't have to pointer to a development commit anymore. cd2e378821e5e5f86215643e87a6b806a8b54492 2026-05-29T16:56:57Z 2026-05-29T16:56:57Z tests/cc: Use make to build the programs Roberto E. Vargas Caballero k0ga@shike2.net commit cd2e378821e5e5f86215643e87a6b806a8b54492 parent f60bf2a21373462c9b7636b9546a6574c9db7f5f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 18:56:57 +0200 tests/cc: Use make to build the programs This simplifies the shell script and the Makefile. f60bf2a21373462c9b7636b9546a6574c9db7f5f 2026-05-29T16:33:39Z 2026-05-29T16:33:39Z libc/stdio: Reorder functions in header Roberto E. Vargas Caballero k0ga@shike2.net commit f60bf2a21373462c9b7636b9546a6574c9db7f5f parent 00d2b697dbd14b05c12e05fa1b50fa8d9fa1fbd4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 18:33:39 +0200 libc/stdio: Reorder functions in header 00d2b697dbd14b05c12e05fa1b50fa8d9fa1fbd4 2026-05-29T12:34:38Z 2026-05-29T12:34:38Z tests/libc: Add -s to make to be silent Roberto E. Vargas Caballero k0ga@shike2.net commit 00d2b697dbd14b05c12e05fa1b50fa8d9fa1fbd4 parent d9b6c4384a9995d70c3bfa352d343a84c7491059 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 14:34:38 +0200 tests/libc: Add -s to make to be silent d9b6c4384a9995d70c3bfa352d343a84c7491059 2026-05-29T12:34:10Z 2026-05-29T12:34:10Z tests/libc: Add 0099-tmpnam Roberto E. Vargas Caballero k0ga@shike2.net commit d9b6c4384a9995d70c3bfa352d343a84c7491059 parent 33141db27c405bbec69efaa2808b502d091c36e8 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 14:34:10 +0200 tests/libc: Add 0099-tmpnam 33141db27c405bbec69efaa2808b502d091c36e8 2026-05-29T11:19:29Z 2026-05-29T11:19:29Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 33141db27c405bbec69efaa2808b502d091c36e8 parent 36a1eef62de6d85631e2f6ae728620dec34454cc Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 13:19:29 +0200 Merge remote-tracking branch 'origin/master' 74119bd8d7b2d8a91b2b2e5bd7984ce5377402ab 2026-05-29T11:16:32Z 2026-05-29T11:16:32Z cc2/qbe: Emit an initial body label Roberto E. Vargas Caballero k0ga@shike2.net commit 74119bd8d7b2d8a91b2b2e5bd7984ce5377402ab parent 47b81d4c6f906155f23054757a85c829aff80c40 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 29 May 2026 13:16:32 +0200 cc2/qbe: Emit an initial body label This label is needed because otherwise branching to the label at the beginning og the function generates an error in qbe: invalid jump to the start block 36a1eef62de6d85631e2f6ae728620dec34454cc 2026-05-28T09:39:48Z 2026-05-29T10:11:18Z tests/libc: Use timeout Roberto E. Vargas Caballero k0ga@shike2.net commit 36a1eef62de6d85631e2f6ae728620dec34454cc parent 3a1198d1a58ea4e4aff5a3c127b9235e14e13c47 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 28 May 2026 11:39:48 +0200 tests/libc: Use timeout While the timeout utility became standard only in POSIX 2024 it was available for many years in every UNIX alike system and dealing directly wit signals and timeout in the shell it is not easy and it was generating problems in OpenBSD. 47b81d4c6f906155f23054757a85c829aff80c40 2026-05-28T08:19:01Z 2026-05-28T08:19:01Z cc1: Don't add addional spaces in macro arguments Roberto E. Vargas Caballero k0ga@shike2.net commit 47b81d4c6f906155f23054757a85c829aff80c40 parent a64383b5e55ca6d2da9cf4039bd8926222a7d9b9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 28 May 2026 10:19:01 +0200 cc1: Don't add addional spaces in macro arguments Cpp was adding spajce between tokens composing a macro argument. This space was needed to avoid undesired concatenations between adjancents tokens, like for example identifiers, but it was breaking some cases of the stringize operator because it wan adding spaces in the string where they were not in the macro argument. The scc tokenizer does not preserves spaces, and this makes a bit difficult to know when to insert spaces for this case, so the simpler solution is just to add a new variable that stores the last space seen in the tokenizer, and lets the caller to manage it as desired because the majority of the code doesn't matter about it. a64383b5e55ca6d2da9cf4039bd8926222a7d9b9 2026-05-25T22:29:39Z 2026-05-25T22:31:59Z cc1: Don't escape \ out of "" or '' Roberto E. Vargas Caballero k0ga@shike2.net commit a64383b5e55ca6d2da9cf4039bd8926222a7d9b9 parent e22d82e7c5eff9eb5b0390e06b7df8e11c7e4599 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 26 May 2026 00:29:39 +0200 cc1: Don't escape \ out of "" or '' e22d82e7c5eff9eb5b0390e06b7df8e11c7e4599 2026-05-25T08:54:03Z 2026-05-25T08:54:03Z test/cc: Add more cases to 0273-cpp Roberto E. Vargas Caballero k0ga@shike2.net commit e22d82e7c5eff9eb5b0390e06b7df8e11c7e4599 parent ef83e049a0f548e2ca4c1bb7f8d4fae71a2c8678 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 25 May 2026 10:54:03 +0200 test/cc: Add more cases to 0273-cpp ef83e049a0f548e2ca4c1bb7f8d4fae71a2c8678 2026-05-25T08:41:49Z 2026-05-25T08:41:49Z tests/cc: Use SCC for the test driven compiler Roberto E. Vargas Caballero k0ga@shike2.net commit ef83e049a0f548e2ca4c1bb7f8d4fae71a2c8678 parent e662a3a5d5922a6f3925731ff52363834e1c9d4d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 25 May 2026 10:41:49 +0200 tests/cc: Use SCC for the test driven compiler This helps when generating coverage information. e662a3a5d5922a6f3925731ff52363834e1c9d4d 2026-05-25T08:40:29Z 2026-05-25T08:40:29Z cc1: Add \r to cppspaces() Roberto E. Vargas Caballero k0ga@shike2.net commit e662a3a5d5922a6f3925731ff52363834e1c9d4d parent 9dfcc04c761ad5d218a1178795398883c0925aba Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 25 May 2026 10:40:29 +0200 cc1: Add \r to cppspaces() While this is not required (accepted?) by the standard, ignoring them would help in cases where source code from Win is used in Unix systems. 9dfcc04c761ad5d218a1178795398883c0925aba 2026-05-22T09:59:54Z 2026-05-22T10:13:54Z tests/cc: Add 0273-cpp.c Roberto E. Vargas Caballero k0ga@shike2.net commit 9dfcc04c761ad5d218a1178795398883c0925aba parent 328388439b2db162f7dedb75db497509131cc745 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 22 May 2026 11:59:54 +0200 tests/cc: Add 0273-cpp.c 328388439b2db162f7dedb75db497509131cc745 2026-05-22T09:26:14Z 2026-05-22T09:30:04Z cc1: Add cppspaces() Roberto E. Vargas Caballero k0ga@shike2.net commit 328388439b2db162f7dedb75db497509131cc745 parent 693af8c7f3cef75f855092950a8601e25714a23d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 22 May 2026 11:26:14 +0200 cc1: Add cppspaces() The rules about how the preprocssor must handle spaces are a bit unspecified in the standard. The paragraph 6.4.3 says: Preprocessing tokens can be separated by white space; this consists of comments (described later), or white-space characters (space, horizontal tab, new-line, vertical tab, and form-feed), or both but 6.10.5 says: The only white-space characters that shall appear between preprocessing tokens within a preprocessing directive (from just after the introducing # preprocessing token through just before the terminating new-line character) are space and horizontal-tab (including spaces that have replaced comments or possibly other white-space characters in translation phase 3). so, it seems that this paragraph seems to limit the spaces in preprocessing directives to only ' ' and '\t', but 5.1.1.2.1 says about translation phase 3: Each comment is replaced by one space character. New-line characters are retained. Whether each nonempty sequence of white-space characters other than new-line is retained or replaced by one space character is implementation-defined. so, as 6.10.5 accepts the changes possibily done in translation phase 3, then we can decide to accept all the white spaces in preprocessor directives. To make all this stuff simpler we just deal all the white spaces in the same way using the freedom provided by 5.1.1.2.1, and we add a new cppspace() function to avoid problems with ctype isspace() because there are cases where valid programs can pass characters over 127 and being processed by these calls, for example: #define a(x) #x a(word) `word` can contain any character, including utf8 characters over 127 and still being a valid C program, so using isspaces there can be problematic. While we don't care so much about having problems with invalid inputs (as in these cases the result is undefined) it is different in the case of vaild inputs. 693af8c7f3cef75f855092950a8601e25714a23d 2026-05-22T09:06:58Z 2026-05-22T09:24:03Z cc1: Consolidate spaces in stringize operator Roberto E. Vargas Caballero k0ga@shike2.net commit 693af8c7f3cef75f855092950a8601e25714a23d parent f2553ae4bbaeabd5c6ecee8d2b0aa1c7e1f3f16f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 22 May 2026 11:06:58 +0200 cc1: Consolidate spaces in stringize operator The rules about spaces in stringize operators are specified in 6.10.3.2 of the C99 spec, and it defines that any sequence of white space between preprocessor tokens must be consolidated to a single white space character, but the white characters in strings or character constants must be preserved. In the same way, " and \ must be escaped. f2553ae4bbaeabd5c6ecee8d2b0aa1c7e1f3f16f 2026-05-22T08:49:53Z 2026-05-22T08:49:53Z cc1: Accept spaces after stringize operator Roberto E. Vargas Caballero k0ga@shike2.net commit f2553ae4bbaeabd5c6ecee8d2b0aa1c7e1f3f16f parent 5e1de781e494bc498563179f42fa19355816b29b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 22 May 2026 10:49:53 +0200 cc1: Accept spaces after stringize operator Spaces after # operator in macro definitions must be ignored. 5e1de781e494bc498563179f42fa19355816b29b 2026-05-21T09:12:36Z 2026-05-21T09:12:36Z cc1: Fix cpp parameter space strimming Roberto E. Vargas Caballero k0ga@shike2.net commit 5e1de781e494bc498563179f42fa19355816b29b parent ebcda96d082604b10e93af543fd719ed037f4746 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 21 May 2026 11:12:36 +0200 cc1: Fix cpp parameter space strimming The trailing white spaces where not removed because we were always checking the ending \0 instead of the last character of the string. ebcda96d082604b10e93af543fd719ed037f4746 2026-05-20T08:01:37Z 2026-05-20T08:01:37Z cc1: Use isspace() around concat operator Roberto E. Vargas Caballero k0ga@shike2.net commit ebcda96d082604b10e93af543fd719ed037f4746 parent 1e0f1124de63a6ef2e30314484fca2e2f60da4ad Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 20 May 2026 10:01:37 +0200 cc1: Use isspace() around concat operator The spec indicates that a preprocessor white space is any of ' ', \t, \f, \v and \n. As we use the default C locale that is equivalent to use isspace(), which is already used in other places of the cpp, even when there are (very rare) cases where it could produce problems. 1e0f1124de63a6ef2e30314484fca2e2f60da4ad 2026-05-12T10:55:38Z 2026-05-12T10:57:38Z build: Continue with the migration to scc Roberto E. Vargas Caballero k0ga@shike2.net commit 1e0f1124de63a6ef2e30314484fca2e2f60da4ad parent 783ac157e892d418efb54c7c3b4e76e2330f65d9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 12:55:38 +0200 build: Continue with the migration to scc This commits continue with the migration to use scc for the libc and for the tests. It also means removing the gcc-scc tool that used to be used to test the libc before scc was able to complie it. In case of being needed it can be recovered from the history. 783ac157e892d418efb54c7c3b4e76e2330f65d9 2026-05-12T10:51:05Z 2026-05-12T10:51:05Z build: Reorder includes in gcov profile Roberto E. Vargas Caballero k0ga@shike2.net commit 783ac157e892d418efb54c7c3b4e76e2330f65d9 parent a27201f2a9b36722cc7a81b31b0e6ae0621078bb Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 12:51:05 +0200 build: Reorder includes in gcov profile It allows to override variables defined in the gnu profile a27201f2a9b36722cc7a81b31b0e6ae0621078bb 2026-05-12T10:18:02Z 2026-05-12T10:18:02Z tests/libc: Adjust FOPEN_MAX in 0098-tmpfil Roberto E. Vargas Caballero k0ga@shike2.net commit a27201f2a9b36722cc7a81b31b0e6ae0621078bb parent d681ea0ce2e1903f5047140fb3bcb6da1dc0e673 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 12:18:02 +0200 tests/libc: Adjust FOPEN_MAX in 0098-tmpfil The value of FOPEN_MAX includes stdin, stdout and stderr so it is impossible to open FOPEN_MAX new streams. d681ea0ce2e1903f5047140fb3bcb6da1dc0e673 2026-05-12T10:15:06Z 2026-05-12T10:15:06Z libc/stdio: Fix tmpnam() Roberto E. Vargas Caballero k0ga@shike2.net commit d681ea0ce2e1903f5047140fb3bcb6da1dc0e673 parent 6c5c5ab6a9adc01a81abbc1cc6e2b26d0b9a53fb Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 12:15:06 +0200 libc/stdio: Fix tmpnam() The logic to find the digits to increment was wrong and it returned FALSE always. 6c5c5ab6a9adc01a81abbc1cc6e2b26d0b9a53fb 2026-05-12T09:27:31Z 2026-05-12T09:28:44Z tests/cc: Remove entries from .gitignore Roberto E. Vargas Caballero k0ga@shike2.net commit 6c5c5ab6a9adc01a81abbc1cc6e2b26d0b9a53fb parent d0c8ee4efa225ebecb471bef5bcbe3a7033de81c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 11:27:31 +0200 tests/cc: Remove entries from .gitignore We don't use test names for this test suite. d0c8ee4efa225ebecb471bef5bcbe3a7033de81c 2026-05-06T19:33:16Z 2026-05-12T09:28:44Z build/gcov: Override SCC Roberto E. Vargas Caballero k0ga@shike2.net commit d0c8ee4efa225ebecb471bef5bcbe3a7033de81c parent 937941341d13f7fd6da062d332faf4a1be4edd04 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 21:33:16 +0200 build/gcov: Override SCC When the gcov toolchain is used then we don't want to use scc for the tests, because that removes any possibility of extracting coverage information. We still have problems with the coverage of the libc, because when we use gcc then we use the gcc libc. 937941341d13f7fd6da062d332faf4a1be4edd04 2026-05-12T07:45:02Z 2026-05-12T07:45:02Z tests/make: Add 0110-loop Roberto E. Vargas Caballero k0ga@shike2.net commit 937941341d13f7fd6da062d332faf4a1be4edd04 parent 95b1d6c4ae74328c31bc2a3bdc80db53886bedea Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 09:45:02 +0200 tests/make: Add 0110-loop 95b1d6c4ae74328c31bc2a3bdc80db53886bedea 2026-05-12T07:40:59Z 2026-05-12T07:43:06Z make: Use recursion to find circular dependencies Roberto E. Vargas Caballero k0ga@shike2.net commit 95b1d6c4ae74328c31bc2a3bdc80db53886bedea parent fddf43508290bc39144364d09e641f3bba7ef095 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 09:40:59 +0200 make: Use recursion to find circular dependencies fddf43508290bc39144364d09e641f3bba7ef095 2026-05-12T07:32:04Z 2026-05-12T07:32:04Z tests/cc: Add 0041-iconst to the test list Roberto E. Vargas Caballero k0ga@shike2.net commit fddf43508290bc39144364d09e641f3bba7ef095 parent 720db27ed2d65d714ad11f96b3368c7a83b2ac11 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 12 May 2026 09:32:04 +0200 tests/cc: Add 0041-iconst to the test list 720db27ed2d65d714ad11f96b3368c7a83b2ac11 2026-05-11T19:01:59Z 2026-05-11T19:01:59Z tests/cc: Update scc path in update.sh Roberto E. Vargas Caballero k0ga@shike2.net commit 720db27ed2d65d714ad11f96b3368c7a83b2ac11 parent aae32c7523883c103a8bdb847549345388563c54 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 11 May 2026 21:01:59 +0200 tests/cc: Update scc path in update.sh The shell script update.sh is a helper to automatize getting the error messages from scc, and for that reason it should point to the scc produced by the build and not the one from the PATH. aae32c7523883c103a8bdb847549345388563c54 2026-05-11T19:01:27Z 2026-05-11T19:01:27Z tests/cc: Add execute/0041-iconst Roberto E. Vargas Caballero k0ga@shike2.net commit aae32c7523883c103a8bdb847549345388563c54 parent 33787455afaea0e22d89176ede170941766a9bd4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 11 May 2026 21:01:27 +0200 tests/cc: Add execute/0041-iconst 33787455afaea0e22d89176ede170941766a9bd4 2026-05-11T18:55:40Z 2026-05-11T18:55:40Z cc1: Check type of array designator index Roberto E. Vargas Caballero k0ga@shike2.net commit 33787455afaea0e22d89176ede170941766a9bd4 parent ea6d8cf4e6d83ca32ce98443dc939ec897daf6b7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 11 May 2026 20:55:40 +0200 cc1: Check type of array designator index The expression between [ ] must an integer constant expression, and the function iconstexpr() returns NULL in that case and it has to be checked to give the proper error message. ea6d8cf4e6d83ca32ce98443dc939ec897daf6b7 2026-05-11T08:16:52Z 2026-05-11T08:16:52Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit ea6d8cf4e6d83ca32ce98443dc939ec897daf6b7 parent 334fc49dab766c427e4ea98719cbaf869e60b6c9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 11 May 2026 10:16:52 +0200 Merge remote-tracking branch 'origin/master' 334fc49dab766c427e4ea98719cbaf869e60b6c9 2026-05-11T08:04:31Z 2026-05-11T08:04:31Z ranlib: Remove offset and oldsiz globals Roberto E. Vargas Caballero k0ga@shike2.net commit 334fc49dab766c427e4ea98719cbaf869e60b6c9 parent 0dcd0d571ff51bbc87adcec9531f6a21707823d6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 11 May 2026 10:04:31 +0200 ranlib: Remove offset and oldsiz globals How these variables were used was a bit weirdd, since they could just be parameters passed to newsymbol(), and avoid the delta calculation storing only offset without any index in the first stage. That makes trivial to do the second phase. 3a1198d1a58ea4e4aff5a3c127b9235e14e13c47 2026-05-08T19:21:41Z 2026-05-08T19:21:41Z libc/stdio: Use wb+ for tmpfile() Roberto E. Vargas Caballero k0ga@shike2.net commit 3a1198d1a58ea4e4aff5a3c127b9235e14e13c47 parent 0dcd0d571ff51bbc87adcec9531f6a21707823d6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 21:21:41 +0200 libc/stdio: Use wb+ for tmpfile() It is required by the C99 spec, but in our case there is not difference between text and binary streams anyway. 0dcd0d571ff51bbc87adcec9531f6a21707823d6 2026-05-08T18:05:20Z 2026-05-08T18:05:20Z build/libmach: Add elf header dependencies Roberto E. Vargas Caballero k0ga@shike2.net commit 0dcd0d571ff51bbc87adcec9531f6a21707823d6 parent d8242493b4b9b1b20e2a22403eec1f550c6fed14 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 20:05:20 +0200 build/libmach: Add elf header dependencies d8242493b4b9b1b20e2a22403eec1f550c6fed14 2026-05-08T18:00:32Z 2026-05-08T18:00:32Z libmach: Remove unused elf64.h header Roberto E. Vargas Caballero k0ga@shike2.net commit d8242493b4b9b1b20e2a22403eec1f550c6fed14 parent a4c40d95dec037a875469cddc7987c8d3783c86a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 20:00:32 +0200 libmach: Remove unused elf64.h header a4c40d95dec037a875469cddc7987c8d3783c86a 2026-05-08T17:44:40Z 2026-05-08T17:57:40Z libmach: Unify coff32getidx and elfgetidx Roberto E. Vargas Caballero k0ga@shike2.net commit a4c40d95dec037a875469cddc7987c8d3783c86a parent 260689938154916eebc6d7002c81f001a8771ab3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 19:44:40 +0200 libmach: Unify coff32getidx and elfgetidx 260689938154916eebc6d7002c81f001a8771ab3 2026-05-08T17:44:40Z 2026-05-08T17:44:40Z libmach: Unify coff32setidx and elfsetidx Roberto E. Vargas Caballero k0ga@shike2.net commit 260689938154916eebc6d7002c81f001a8771ab3 parent fc170495f7e645ac620e28c546cdd7401d1668c7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 19:44:40 +0200 libmach: Unify coff32setidx and elfsetidx fc170495f7e645ac620e28c546cdd7401d1668c7 2026-05-08T17:32:01Z 2026-05-08T17:32:01Z build/libc: Use scc-ranlib Roberto E. Vargas Caballero k0ga@shike2.net commit fc170495f7e645ac620e28c546cdd7401d1668c7 parent 887b0bef5f76997de2bdbd2a91168dde357821d1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 19:32:01 +0200 build/libc: Use scc-ranlib 887b0bef5f76997de2bdbd2a91168dde357821d1 2026-05-08T17:27:24Z 2026-05-08T17:27:24Z ranlib: Use 2 phases writing the index Roberto E. Vargas Caballero k0ga@shike2.net commit 887b0bef5f76997de2bdbd2a91168dde357821d1 parent 5cdbd266c31962ec9ebcef0415d2f104b209cddb Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 19:27:24 +0200 ranlib: Use 2 phases writing the index When the different offsets are calculated they are based in the size of the existing index if there was any index, but if the new index has a different size then the offset are misplaced. In order to fix this issue we have to record the size of the existing index file, generate the new index file, and apply fixups to every offset to adjust it to the actual offset in the final archive. 5cdbd266c31962ec9ebcef0415d2f104b209cddb 2026-05-08T17:08:59Z 2026-05-08T17:08:59Z ranlib: Use offset to member headers Roberto E. Vargas Caballero k0ga@shike2.net commit 5cdbd266c31962ec9ebcef0415d2f104b209cddb parent c1e1df2ac4a400eae9b97a01106a95cc927f83db Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 19:08:59 +0200 ranlib: Use offset to member headers We were generating an index table of pointers to the content of the object files, but ld expects the pointers to the ar headers which contain required information like the size of the object file. c1e1df2ac4a400eae9b97a01106a95cc927f83db 2026-05-08T16:52:07Z 2026-05-08T16:52:07Z libmach: Use 32BE for index in elf Roberto E. Vargas Caballero k0ga@shike2.net commit c1e1df2ac4a400eae9b97a01106a95cc927f83db parent 6abf674372bf77c7bcd7ed762b3791c67b7fdf47 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 18:52:07 +0200 libmach: Use 32BE for index in elf Archive of elf always use offset of 4 bytes and being big endian independently of the architecture used in the object files. 6abf674372bf77c7bcd7ed762b3791c67b7fdf47 2026-05-08T16:44:35Z 2026-05-08T16:44:35Z ranlib: Fix detection of previous index Roberto E. Vargas Caballero k0ga@shike2.net commit 6abf674372bf77c7bcd7ed762b3791c67b7fdf47 parent e9fd2f28fb1200643f668d500c1239a4154d0cb1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 18:44:35 +0200 ranlib: Fix detection of previous index The strncmp was wrong because after the end of the member name the ar format has spaces that are not going to match with the end of string. Also, it didn't consider the padding of ar members which has to be 2 bytes. e9fd2f28fb1200643f668d500c1239a4154d0cb1 2026-05-08T15:09:40Z 2026-05-08T15:09:40Z libmach: Remove unused variable Roberto E. Vargas Caballero k0ga@shike2.net commit e9fd2f28fb1200643f668d500c1239a4154d0cb1 parent 166e28278d2647af887159e78a28cae8e45fa381 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 17:09:40 +0200 libmach: Remove unused variable 166e28278d2647af887159e78a28cae8e45fa381 2026-05-08T14:17:13Z 2026-05-08T14:31:06Z libmach: Implement setindex() for elf Roberto E. Vargas Caballero k0ga@shike2.net commit 166e28278d2647af887159e78a28cae8e45fa381 parent c3fa57c8e3433a5a3d22b558f97e959fd129d613 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 16:17:13 +0200 libmach: Implement setindex() for elf c3fa57c8e3433a5a3d22b558f97e959fd129d613 2026-05-08T14:14:20Z 2026-05-08T14:22:10Z libc: Remove duplicated _open Roberto E. Vargas Caballero k0ga@shike2.net commit c3fa57c8e3433a5a3d22b558f97e959fd129d613 parent 6212cd97ef3b5311a8245131e8bf5f9957e4fd67 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 16:14:20 +0200 libc: Remove duplicated _open _open can be implemented with a syscall or with a wrapper using _openat. Some versions of linux only has _openat and it is required to use _openat to implement _open, but in many other systems like in openbsd and netbsd you have a _open syscall and having both symbols in the archive makes impredictable which symbol is used. 6212cd97ef3b5311a8245131e8bf5f9957e4fd67 2026-05-08T13:34:16Z 2026-05-08T14:22:03Z libmach: Encode number of bits in OBJ() Roberto E. Vargas Caballero k0ga@shike2.net commit 6212cd97ef3b5311a8245131e8bf5f9957e4fd67 parent 73b42fa96c7f6580d0cc18a4611c620e3ec28e44 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 15:34:16 +0200 libmach: Encode number of bits in OBJ() Some formats have different versions based in being a 32 or 64 bit version, and deriving it from the arch has corner cases and it requires continous maintainance. 73b42fa96c7f6580d0cc18a4611c620e3ec28e44 2026-05-08T12:03:50Z 2026-05-08T14:21:53Z libmach: Make coff32csetidx generic Roberto E. Vargas Caballero k0ga@shike2.net commit 73b42fa96c7f6580d0cc18a4611c620e3ec28e44 parent 87395a88f21b0102683b3d1ce8754a5f6fa6cf5a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 14:03:50 +0200 libmach: Make coff32csetidx generic The function coff32csetidx() can be used for elf too because they share the index file format. A.out had a different layout, but as we don't support it yet, we can just use the name setidx32(). 87395a88f21b0102683b3d1ce8754a5f6fa6cf5a 2026-05-08T10:10:45Z 2026-05-08T10:23:21Z as: Remove debug abort() Roberto E. Vargas Caballero k0ga@shike2.net commit 87395a88f21b0102683b3d1ce8754a5f6fa6cf5a parent 70da2bb8081e70c1ee0f2d9a90104356b61e6b9a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 12:10:45 +0200 as: Remove debug abort() The call to abort() was a leftover from a previous change where we added support for folding constant labels. We still have cases where we can't deal with non constant expressions that would require support from relocations. 70da2bb8081e70c1ee0f2d9a90104356b61e6b9a 2026-05-08T07:57:17Z 2026-05-08T07:57:17Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 70da2bb8081e70c1ee0f2d9a90104356b61e6b9a parent 69a6dd3cdb185af347d93e03f82e9f303575843f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 09:57:17 +0200 Merge remote-tracking branch 'origin/master' 69a6dd3cdb185af347d93e03f82e9f303575843f 2026-05-08T07:54:28Z 2026-05-08T07:54:28Z ranlib: Ignore undefine references Roberto E. Vargas Caballero k0ga@shike2.net commit 69a6dd3cdb185af347d93e03f82e9f303575843f parent 49ad9073f0ae0db7c459cba3e41dfccaa95c7abe Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 09:54:28 +0200 ranlib: Ignore undefine references When building an index of symbol definitions undefine references don't help so much and with the current code they were generating wrong redefinition errors. 49ad9073f0ae0db7c459cba3e41dfccaa95c7abe 2026-05-08T07:52:11Z 2026-05-08T07:52:11Z ranlib: Fix offset calculation Roberto E. Vargas Caballero k0ga@shike2.net commit 49ad9073f0ae0db7c459cba3e41dfccaa95c7abe parent 77f7bee754210661f4bcf5cdcdebdb3058bb8a8b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 8 May 2026 09:52:11 +0200 ranlib: Fix offset calculation After reading th header of an archive member the file pointer is already located at the end of the header and armember returns the offset from the beginning of the archive header, so we have to use the cur variable instead of the offset in the file pointer. 117094fdd583ac0907bef5e80e27f23a84847735 2026-05-07T08:38:17Z 2026-05-07T08:38:17Z tests/libc: Add 0098-tmpfil Roberto E. Vargas Caballero k0ga@shike2.net commit 117094fdd583ac0907bef5e80e27f23a84847735 parent 6f15a112f5ed7705f322845bdb7c9914d191dbc7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 7 May 2026 10:38:17 +0200 tests/libc: Add 0098-tmpfil 6f15a112f5ed7705f322845bdb7c9914d191dbc7 2026-05-06T19:24:55Z 2026-05-06T19:24:55Z build: Fix libscc-$(DRIVER).a dependency Roberto E. Vargas Caballero k0ga@shike2.net commit 6f15a112f5ed7705f322845bdb7c9914d191dbc7 parent e62db67e3da88d0e908dd58d9e7688c1c0791bc1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 21:24:55 +0200 build: Fix libscc-$(DRIVER).a dependency e62db67e3da88d0e908dd58d9e7688c1c0791bc1 2026-05-06T19:19:35Z 2026-05-06T19:19:35Z build: Cover Add coverage to top Makefile Roberto E. Vargas Caballero k0ga@shike2.net commit e62db67e3da88d0e908dd58d9e7688c1c0791bc1 parent f32b47792675b766275a003f4a644973d72f89e7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 21:19:35 +0200 build: Cover Add coverage to top Makefile The coverage target is defined in the gcov toolchain, but it needs to be populated in the top level Makefile in order to be used. f32b47792675b766275a003f4a644973d72f89e7 2026-05-06T19:15:55Z 2026-05-06T19:15:55Z libc/cc: Minor fixes Roberto E. Vargas Caballero k0ga@shike2.net commit f32b47792675b766275a003f4a644973d72f89e7 parent b4bb95aaed9b85dc43d293e2c7310e81f0092005 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 21:15:55 +0200 libc/cc: Minor fixes b4bb95aaed9b85dc43d293e2c7310e81f0092005 2026-05-06T19:07:48Z 2026-05-06T19:07:48Z libc/stdio: Use uinptr_t instead of -1 pointers Roberto E. Vargas Caballero k0ga@shike2.net commit b4bb95aaed9b85dc43d293e2c7310e81f0092005 parent 10686ff83b100fbf8f51b136fe5b351be6014226 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 21:07:48 +0200 libc/stdio: Use uinptr_t instead of -1 pointers Using (char *)-1 - s should work in the majority of systems and or compilers, but using uinptr_t and UINTPTR_MAX makes the code cleaner and allows to remove the comment. 10686ff83b100fbf8f51b136fe5b351be6014226 2026-05-06T18:58:19Z 2026-05-06T18:59:25Z tests/libc: Add 0097-fops Roberto E. Vargas Caballero k0ga@shike2.net commit 10686ff83b100fbf8f51b136fe5b351be6014226 parent 442f7a3a7ae3ad6412dbee2b688a85bef45a89f7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 20:58:19 +0200 tests/libc: Add 0097-fops 442f7a3a7ae3ad6412dbee2b688a85bef45a89f7 2026-05-06T18:54:32Z 2026-05-06T18:59:25Z tests/libc: Remove debug comment from 0096-div Roberto E. Vargas Caballero k0ga@shike2.net commit 442f7a3a7ae3ad6412dbee2b688a85bef45a89f7 parent 77f7bee754210661f4bcf5cdcdebdb3058bb8a8b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 20:54:32 +0200 tests/libc: Remove debug comment from 0096-div 77f7bee754210661f4bcf5cdcdebdb3058bb8a8b 2026-05-06T18:28:43Z 2026-05-06T18:28:43Z build/libc: Use scc ar Roberto E. Vargas Caballero k0ga@shike2.net commit 77f7bee754210661f4bcf5cdcdebdb3058bb8a8b parent f1fd6cc9a7ab7a9e2154674f5b59118b58727dad Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 20:28:43 +0200 build/libc: Use scc ar f1fd6cc9a7ab7a9e2154674f5b59118b58727dad 2026-05-06T13:46:38Z 2026-05-06T13:46:38Z tests/libc: Fix expected output Roberto E. Vargas Caballero k0ga@shike2.net commit f1fd6cc9a7ab7a9e2154674f5b59118b58727dad parent abb580ab3b5c38c0a59ee61220dbada9147bf615 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 15:46:38 +0200 tests/libc: Fix expected output abb580ab3b5c38c0a59ee61220dbada9147bf615 2026-05-06T11:14:28Z 2026-05-06T11:22:58Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit abb580ab3b5c38c0a59ee61220dbada9147bf615 parent d2d1660217ff0a583f1d5736be450ac97a8d8035 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 13:14:28 +0200 Merge remote-tracking branch 'origin/master' d2d1660217ff0a583f1d5736be450ac97a8d8035 2026-05-06T11:13:46Z 2026-05-06T11:22:58Z tests/libc: Add 0096-div Roberto E. Vargas Caballero k0ga@shike2.net commit d2d1660217ff0a583f1d5736be450ac97a8d8035 parent d6d570e027558233db7d49102557ad4865845e76 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 13:13:46 +0200 tests/libc: Add 0096-div 6da80aa96eaf48cd85fe1183b86f6a264ef4319a 2026-05-06T08:54:00Z 2026-05-06T11:22:58Z doc: Update scc-cc.1 with ignored -pipe option Roberto E. Vargas Caballero k0ga@shike2.net commit 6da80aa96eaf48cd85fe1183b86f6a264ef4319a parent 49e32bc0eead3e6a85d284a7bbfada253e813b13 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 10:54:00 +0200 doc: Update scc-cc.1 with ignored -pipe option d6d570e027558233db7d49102557ad4865845e76 2026-05-06T08:24:01Z 2026-05-06T11:22:58Z cc2/qbe: Whitespace change Roberto E. Vargas Caballero k0ga@shike2.net commit d6d570e027558233db7d49102557ad4865845e76 parent 77bdf8dce1514fb0bb812428784f41fa02628511 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 10:24:01 +0200 cc2/qbe: Whitespace change 49e32bc0eead3e6a85d284a7bbfada253e813b13 2026-05-06T08:51:42Z 2026-05-06T11:22:58Z build/openbsd: Use scc_clang libprofile by default Roberto E. Vargas Caballero k0ga@shike2.net commit 49e32bc0eead3e6a85d284a7bbfada253e813b13 parent 77f0a2c2cff21b19223f8fae93b8344d7e57972a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 10:51:42 +0200 build/openbsd: Use scc_clang libprofile by default Openbsd as is an old version of gas, and qbe emits some syntax that is not accepted by openbsd as. The libprofile scc_clang was added long time ago to support openbsd better, so it makes sense to use it by default. 77bdf8dce1514fb0bb812428784f41fa02628511 2026-05-06T08:22:27Z 2026-05-06T11:22:58Z cc2: Remove some of the escape sequences Roberto E. Vargas Caballero k0ga@shike2.net commit 77bdf8dce1514fb0bb812428784f41fa02628511 parent 7c50a30f3752d051e7745525d25740e88d115366 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 10:22:27 +0200 cc2: Remove some of the escape sequences Some sequences are valid C sequences, but they don't make sense when we generate the asm code, like for example the \? or others are not needed (and not accepted by assemblers) like for example \' in a string. 77f0a2c2cff21b19223f8fae93b8344d7e57972a 2026-05-06T08:25:55Z 2026-05-06T11:22:58Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 77f0a2c2cff21b19223f8fae93b8344d7e57972a parent 07765e654c10f17169bd66e0e5ca3e6205a449b7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 6 May 2026 10:25:55 +0200 Merge remote-tracking branch 'origin/master' 7c50a30f3752d051e7745525d25740e88d115366 2026-05-02T07:47:58Z 2026-05-06T11:22:58Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 7c50a30f3752d051e7745525d25740e88d115366 parent 5c8293050bf3288cccd5249ee120460a49a43631 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 2 May 2026 09:47:58 +0200 Merge remote-tracking branch 'origin/master' 07765e654c10f17169bd66e0e5ca3e6205a449b7 2026-05-04T16:36:23Z 2026-05-06T11:22:58Z scc: Ignore -pipe option Roberto E. Vargas Caballero k0ga@shike2.net commit 07765e654c10f17169bd66e0e5ca3e6205a449b7 parent 0654230abc8c9cef6f0603ec456ef63471599e86 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 4 May 2026 18:36:23 +0200 scc: Ignore -pipe option This is used by default in OpenBSD. 0654230abc8c9cef6f0603ec456ef63471599e86 2026-05-01T20:22:23Z 2026-05-06T11:22:53Z Merge branch 'master' into dev Roberto E. Vargas Caballero k0ga@shike2.net commit 0654230abc8c9cef6f0603ec456ef63471599e86 parent 0ee5b49181c1813e136046ad648f909fe6102ea4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 22:22:23 +0200 Merge branch 'master' into dev 0ee5b49181c1813e136046ad648f909fe6102ea4 2026-05-01T17:55:24Z 2026-05-01T20:22:05Z tests/libc: Add 0095-abs Roberto E. Vargas Caballero k0ga@shike2.net commit 0ee5b49181c1813e136046ad648f909fe6102ea4 parent f9dd9d11f059550c22ff819080400574d515da8e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 19:55:24 +0200 tests/libc: Add 0095-abs f9dd9d11f059550c22ff819080400574d515da8e 2026-05-01T17:40:38Z 2026-05-01T20:22:04Z tests/libc: Add 0094-bsearch Roberto E. Vargas Caballero k0ga@shike2.net commit f9dd9d11f059550c22ff819080400574d515da8e parent d96e3eb8b442d7a67846161f37e368d5a64b95b2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 19:40:38 +0200 tests/libc: Add 0094-bsearch d96e3eb8b442d7a67846161f37e368d5a64b95b2 2026-05-01T19:47:04Z 2026-05-01T20:22:04Z libc/qsprt: Fix typo calculating nj Roberto E. Vargas Caballero k0ga@shike2.net commit d96e3eb8b442d7a67846161f37e368d5a64b95b2 parent 67dc80bf14ef15162fa94ded320c7a338a330267 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 21:47:04 +0200 libc/qsprt: Fix typo calculating nj The variable nj was using nj that was not initialized and it should be ni, because nj is just the amount of space after removing the ni elements. 67dc80bf14ef15162fa94ded320c7a338a330267 2026-05-01T19:45:02Z 2026-05-01T20:22:04Z libc/qsort: Use unsigned char instead of char Roberto E. Vargas Caballero k0ga@shike2.net commit 67dc80bf14ef15162fa94ded320c7a338a330267 parent 89dd30dc93dcee2a470c322901a63dd69f476a7c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 21:45:02 +0200 libc/qsort: Use unsigned char instead of char While it is not very important in this specific case because we only transfer between char pointers, but having char can involve sign extensions that are later discarded, so it is just better to use unsigned. 89dd30dc93dcee2a470c322901a63dd69f476a7c 2026-05-01T17:03:41Z 2026-05-01T20:22:04Z tests/libc: Add 0093-system Roberto E. Vargas Caballero k0ga@shike2.net commit 89dd30dc93dcee2a470c322901a63dd69f476a7c parent 630099c016f0cb6c231f10e78b77926ae57bdfaf Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 19:03:41 +0200 tests/libc: Add 0093-system 630099c016f0cb6c231f10e78b77926ae57bdfaf 2026-05-01T16:56:31Z 2026-05-01T20:22:04Z tests/libc: Add 0092-getenv Roberto E. Vargas Caballero k0ga@shike2.net commit 630099c016f0cb6c231f10e78b77926ae57bdfaf parent e11ab93848714e96d346795e2cc4be2c86dce19c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 18:56:31 +0200 tests/libc: Add 0092-getenv e11ab93848714e96d346795e2cc4be2c86dce19c 2026-05-01T11:21:02Z 2026-05-01T20:22:04Z tests/libc: Add 0091-atexit Roberto E. Vargas Caballero k0ga@shike2.net commit e11ab93848714e96d346795e2cc4be2c86dce19c parent f31dacb5f419d4e082230bd8366c97585e5c9b16 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 13:21:02 +0200 tests/libc: Add 0091-atexit f31dacb5f419d4e082230bd8366c97585e5c9b16 2026-04-30T21:51:30Z 2026-05-01T20:22:04Z tests/libc: Add 0090-rand Roberto E. Vargas Caballero k0ga@shike2.net commit f31dacb5f419d4e082230bd8366c97585e5c9b16 parent 2b616739bf590b1f3cbf3740e5b60e1b56e5edd2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 23:51:30 +0200 tests/libc: Add 0090-rand 2b616739bf590b1f3cbf3740e5b60e1b56e5edd2 2026-05-01T09:35:30Z 2026-05-01T20:22:04Z tests/cc Add 0272-div Roberto E. Vargas Caballero k0ga@shike2.net commit 2b616739bf590b1f3cbf3740e5b60e1b56e5edd2 parent c090b15bd2998ec3d1c51956dcbd3a9dc10e8328 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 11:35:30 +0200 tests/cc Add 0272-div c090b15bd2998ec3d1c51956dcbd3a9dc10e8328 2026-05-01T09:25:00Z 2026-05-01T20:22:04Z cc1: Extend cmpnode() to support floats Roberto E. Vargas Caballero k0ga@shike2.net commit c090b15bd2998ec3d1c51956dcbd3a9dc10e8328 parent e233f10476a51629c1a70b0a16fdc01157059214 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 11:25:00 +0200 cc1: Extend cmpnode() to support floats e233f10476a51629c1a70b0a16fdc01157059214 2026-04-30T21:10:00Z 2026-05-01T20:22:04Z tests/libc: Add 0089-strtoull Roberto E. Vargas Caballero k0ga@shike2.net commit e233f10476a51629c1a70b0a16fdc01157059214 parent 93f02dd35b1cd55e620f244bff9d0e4cb71e656c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 23:10:00 +0200 tests/libc: Add 0089-strtoull 93f02dd35b1cd55e620f244bff9d0e4cb71e656c 2026-04-30T21:07:07Z 2026-05-01T20:22:04Z tests/libc: Add 0088-strtoul Roberto E. Vargas Caballero k0ga@shike2.net commit 93f02dd35b1cd55e620f244bff9d0e4cb71e656c parent f883479c0b091d0f65d48430dfe7205d54e623ac Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 23:07:07 +0200 tests/libc: Add 0088-strtoul f883479c0b091d0f65d48430dfe7205d54e623ac 2026-04-30T20:41:01Z 2026-05-01T20:22:04Z libc/tests: Add 0087-strtoll Roberto E. Vargas Caballero k0ga@shike2.net commit f883479c0b091d0f65d48430dfe7205d54e623ac parent a68625773cbd82ba0f38d563aba336d5668b2e43 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 22:41:01 +0200 libc/tests: Add 0087-strtoll a68625773cbd82ba0f38d563aba336d5668b2e43 2026-04-30T20:37:58Z 2026-05-01T20:22:04Z tests/libc: Add 0086-strtol Roberto E. Vargas Caballero k0ga@shike2.net commit a68625773cbd82ba0f38d563aba336d5668b2e43 parent fad3fe30d4c05fd3307e3b216897635abbad173a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 22:37:58 +0200 tests/libc: Add 0086-strtol fad3fe30d4c05fd3307e3b216897635abbad173a 2026-04-30T20:37:23Z 2026-05-01T20:22:03Z tests/libc: Add placeholders for float conversions Roberto E. Vargas Caballero k0ga@shike2.net commit fad3fe30d4c05fd3307e3b216897635abbad173a parent 66bf1ba94a7097b9c13760c68c1e535bbd9cae5a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 22:37:23 +0200 tests/libc: Add placeholders for float conversions 66bf1ba94a7097b9c13760c68c1e535bbd9cae5a 2026-04-30T19:57:28Z 2026-05-01T20:22:03Z tests/libc: Add 0082-atoll Roberto E. Vargas Caballero k0ga@shike2.net commit 66bf1ba94a7097b9c13760c68c1e535bbd9cae5a parent dafdd8c02c6362f4e9c0ed60d839d939ed4baedf Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 21:57:28 +0200 tests/libc: Add 0082-atoll dafdd8c02c6362f4e9c0ed60d839d939ed4baedf 2026-04-30T19:57:28Z 2026-05-01T20:22:03Z tests/libc: Add 0081-atol Roberto E. Vargas Caballero k0ga@shike2.net commit dafdd8c02c6362f4e9c0ed60d839d939ed4baedf parent 7fd464216a0a7b9b257ac939e5e3368b0708f6c2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 21:57:28 +0200 tests/libc: Add 0081-atol 7fd464216a0a7b9b257ac939e5e3368b0708f6c2 2026-04-30T19:57:28Z 2026-05-01T20:22:03Z tests/libc: Add 0080-atoi Roberto E. Vargas Caballero k0ga@shike2.net commit 7fd464216a0a7b9b257ac939e5e3368b0708f6c2 parent 63e5f14bd7ab8c139c9d7ba6c27e47fd56ef4286 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 21:57:28 +0200 tests/libc: Add 0080-atoi 63e5f14bd7ab8c139c9d7ba6c27e47fd56ef4286 2026-04-30T19:46:25Z 2026-05-01T20:22:03Z tests/libc: Add placeholder for 0079-atof Roberto E. Vargas Caballero k0ga@shike2.net commit 63e5f14bd7ab8c139c9d7ba6c27e47fd56ef4286 parent e3ca3473ebbafdcbf01c0a59a9db06027be90b95 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 21:46:25 +0200 tests/libc: Add placeholder for 0079-atof c9da9623aab2018a04e1bbfd0b54f5a031aa9aca 2026-04-30T19:13:41Z 2026-04-30T19:21:34Z cc1: Avoid out of bound access Roberto E. Vargas Caballero k0ga@shike2.net commit c9da9623aab2018a04e1bbfd0b54f5a031aa9aca parent e3ca3473ebbafdcbf01c0a59a9db06027be90b95 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 21:13:41 +0200 cc1: Avoid out of bound access The function emitstrings() goes over all the elements of the initializer to dump any string involved in the initializer, and it uses the nary value from the type of the initializer. But this is wrong because in unions we have as many files as declared in the type, but we van have only one item in the initializer, and this was causing an out of order access. 5c8293050bf3288cccd5249ee120460a49a43631 2026-04-30T17:14:56Z 2026-04-30T17:14:56Z tests/libc: Export LDFLAGS to runtests.sh Roberto E. Vargas Caballero k0ga@shike2.net commit 5c8293050bf3288cccd5249ee120460a49a43631 parent 98d3c2df3d621e41173a06550316aac4a17c7fb1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 19:14:56 +0200 tests/libc: Export LDFLAGS to runtests.sh 98d3c2df3d621e41173a06550316aac4a17c7fb1 2026-04-30T17:02:58Z 2026-04-30T17:02:58Z libc/posix: Add putenv() Roberto E. Vargas Caballero k0ga@shike2.net commit 98d3c2df3d621e41173a06550316aac4a17c7fb1 parent 6a90fedd0ebd1ac7546c2e535035aba64e422da5 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 30 Apr 2026 19:02:58 +0200 libc/posix: Add putenv() While putenv() is not a c99 function, it is used in several of the tests, but even with some fallback mechanisms there are cases where we still need it. Adding it to the library archive does not hurt and if it does not populate it in any header then we don't disturb the public namespace.