docs(libc): add upstream licence notices to ported math and siglist code #12541

Merged
oneandonlydean merged 3 commits from upstream-pr/12541 into main 2026-10-30 11:50:18 +00:00
oneandonlydean commented 2026-10-28 18:57:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-28T18:57:55Z.


What

Adds the original copyright and licence text, with the upstream file and revision, at the top of the two source files that contain code ported from FreeBSD (including Sun msun code).

  • core/libs/prx/libc/src/Math.cpp: 30 msun files, in six licence groups (Sun 1993, Sun 2004, Sun 1993 SunSoft, David Schultz 2005 and 2008, plus the Cygnus conversion note). Each group has a Derived from line naming the upstream file and the release or commit, then the upstream notice verbatim.
  • core/libs/prx/libSceLibcInternal/SignalList.cpp: siglist.c (FreeBSD 8c639945a445), University of California BSD notice verbatim.

Code is unchanged; the diff is 147 added lines in header comments and no deleted or modified lines. The "comments only for technical debt" rule does not apply to licence notices (owner decision, 28 Oct), so check_conventions reports its comment error on exactly these header lines and nothing else.

qsort, mergesort and heapsort in FileAndHeap.cpp are original code (no shared text with the FreeBSD files), so they get no notice. Math.cpp mixes ported and original functions; only the ported files are listed.

Local file Upstream file Revision
Math.cpp lib/msun/src/e_powf.c release/9.0.0
Math.cpp s_expm1.c, s_log1p.c, e_atan2f.c, s_atanf.c, e_logf.c, e_acosf.c, e_asinf.c, s_tanh.c, s_logb.c, s_logbf.c, e_fmodf.c, s_cbrtf.c, k_sinf.c, k_cosf.c, e_rem_pio2f.c (all lib/msun/src/) release/11.4.0
Math.cpp s_expm1f.c, s_log1pf.c, e_expf.c, e_atanhf.c 59bc2f095289
Math.cpp e_sinhf.c, e_coshf.c, e_acoshf.c 5aa554c7e5b6
Math.cpp s_cbrt.c, k_tanf.c, s_exp2f.c, k_rem_pio2.c, e_sinh.c release/11.4.0
Math.cpp e_asinl.c, lib/msun/ld80/invtrig.c 9f0432041b8f
SignalList.cpp lib/libc/gen/siglist.c 8c639945a445

Tested

Head 17c8f56021 on main cc672fdfc6, Linux, Release build. Selected tests: public_headers, guest_math, guest_math_exact, guest_strtod_subnormal, guest_qsort, guest_errors, guest_error_dialog, guest_err, guest_getopt, guest_signal_list.

head 17c8f56021
tests passed / failed / not run 10 / 0 / 0

No behaviour changes (comments only), so no game or GPU run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt (this PR adds licence notices, which the owner decision exempts)
  • No notes, investigation .md files or images added to the repository
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5056033131 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12541). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-28T18:57:55Z. --- ### What Adds the original copyright and licence text, with the upstream file and revision, at the top of the two source files that contain code ported from FreeBSD (including Sun msun code). - `core/libs/prx/libc/src/Math.cpp`: 30 msun files, in six licence groups (Sun 1993, Sun 2004, Sun 1993 SunSoft, David Schultz 2005 and 2008, plus the Cygnus conversion note). Each group has a `Derived from` line naming the upstream file and the release or commit, then the upstream notice verbatim. - `core/libs/prx/libSceLibcInternal/SignalList.cpp`: `siglist.c` (FreeBSD `8c639945a445`), University of California BSD notice verbatim. Code is unchanged; the diff is 147 added lines in header comments and no deleted or modified lines. The "comments only for technical debt" rule does not apply to licence notices (owner decision, 28 Oct), so `check_conventions` reports its `comment` error on exactly these header lines and nothing else. `qsort`, `mergesort` and `heapsort` in `FileAndHeap.cpp` are original code (no shared text with the FreeBSD files), so they get no notice. `Math.cpp` mixes ported and original functions; only the ported files are listed. | Local file | Upstream file | Revision | |---|---|---| | `Math.cpp` | `lib/msun/src/e_powf.c` | `release/9.0.0` | | `Math.cpp` | `s_expm1.c`, `s_log1p.c`, `e_atan2f.c`, `s_atanf.c`, `e_logf.c`, `e_acosf.c`, `e_asinf.c`, `s_tanh.c`, `s_logb.c`, `s_logbf.c`, `e_fmodf.c`, `s_cbrtf.c`, `k_sinf.c`, `k_cosf.c`, `e_rem_pio2f.c` (all `lib/msun/src/`) | `release/11.4.0` | | `Math.cpp` | `s_expm1f.c`, `s_log1pf.c`, `e_expf.c`, `e_atanhf.c` | `59bc2f095289` | | `Math.cpp` | `e_sinhf.c`, `e_coshf.c`, `e_acoshf.c` | `5aa554c7e5b6` | | `Math.cpp` | `s_cbrt.c`, `k_tanf.c`, `s_exp2f.c`, `k_rem_pio2.c`, `e_sinh.c` | `release/11.4.0` | | `Math.cpp` | `e_asinl.c`, `lib/msun/ld80/invtrig.c` | `9f0432041b8f` | | `SignalList.cpp` | `lib/libc/gen/siglist.c` | `8c639945a445` | ### Tested Head `17c8f56021` on main `cc672fdfc6`, Linux, Release build. Selected tests: `public_headers`, `guest_math`, `guest_math_exact`, `guest_strtod_subnormal`, `guest_qsort`, `guest_errors`, `guest_error_dialog`, `guest_err`, `guest_getopt`, `guest_signal_list`. | | head `17c8f56021` | |---|---| | tests passed / failed / not run | 10 / 0 / 0 | No behaviour changes (comments only), so no game or GPU run. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt (this PR adds licence notices, which the owner decision exempts) - [x] No notes, investigation `.md` files or images added to the repository - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] AI-assisted: yes
MarcZX10 commented 2026-10-28 19:24:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T19:24:52Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The licence notices need an accepted path through the repository's conventions check, and the patch currently also fails git diff --check on one added line.

What I ran

Reviewed head bb4132a403a2dbfcbffad96e024c777db77d7165 against current main 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Debian 12 x86_64, Python 3.11, Git. I inspected the changed notices, current contribution/convention rules, hosted job log, and current checks.

git diff --check refs/review/current-main...refs/review/12541
git merge-tree --write-tree refs/review/current-main refs/review/12541
python3 tools/check_conventions.py --base refs/review/current-main --head refs/review/12541
gh run view 40749977311 --repo boykopovar/AnyPS5 --job 123033782049 --log

Results

Check Result
Merge with current main Clean
Diff check Failed: trailing whitespace on added Math.cpp line 58
Local conventions check Failed: 17 comment errors
Hosted conventions check Failed: 18 errors, including the 17 comment errors and the unchecked template item
Eligibility, intake, labels, report, Ubuntu/Windows relinker, ASan, and Ubuntu register-context Passed
Linux product job Skipped
macOS relinker/register-context/write-watch jobs Still queued
Raw output
core/libs/prx/libc/src/Math.cpp:58: trailing whitespace.
+ * software is freely granted, provided that this notice 
2f6cb2dd6052702b67c99eb1f0fb930711658ef1

The local conventions command ended with:

17 findings, 17 errors; GitHub shows at most 10 error annotations, the job summary lists all

The hosted log ended with:

##[error]Comments are only for technical debt, so they need a change to docs/dev/TechnicalDebt.md or docs/dev/debt/ in the same pull request; #endif and namespace ends are always allowed
##[error]Fill in the pull request template: unchecked: No comments in code except technical debt (this PR adds licence notices, which the owner decision exempts)
18 findings, 18 errors; GitHub shows at most 10 error annotations, the job summary lists all
##[error]Process completed with exit code 1.

Negative control

Assertion Change made to code under test Did the new test fail?
The conventions checker accepts these notices. No mutation; I ran the current base-branch checker against the exact PR head. It failed with 17 comment violations; this is a direct check, not a negative control.

No test or code mutation was run for this documentation/licence-only change.

Findings

Blocking: The current CONTRIBUTING.md says the conventions check runs for every PR and fails when a rule is broken. The hosted check rejects the added source comments and the unchecked checklist item. The PR description mentions an owner decision but does not link to a recorded exception, and no such decision appears in this PR's discussion. Please provide the maintainer-approved exception in a form the repository checks recognize, or coordinate an accepted policy/checker update; then mark the checklist consistently and rerun conventions.

Blocking: git diff --check reports trailing whitespace at core/libs/prx/libc/src/Math.cpp:58. Remove the trailing space and rerun the diff check.

Non-blocking: I have not yet compared every inserted notice against its cited upstream revision; this review does not certify the notice-to-source mapping.

Sources

Not verified

I did not build the project or run the author-reported selected tests. I did not independently validate the upstream copyright and licence text across all cited source revisions. Hosted macOS jobs remain queued, and the Linux product job was skipped.

To get this to a good state

Resolve the conventions failure through the repository-approved process, fix the trailing whitespace, and rerun conventions plus git diff --check. Please provide links to any maintainer decision that authorizes the exception. I will rerun these same checks against the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5688464202 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12541#pullrequestreview-5688464202). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T19:24:52Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The licence notices need an accepted path through the repository's conventions check, and the patch currently also fails `git diff --check` on one added line. ### What I ran Reviewed head `bb4132a403a2dbfcbffad96e024c777db77d7165` against current `main` `319621ba2e578bd053b0baba2877fe70520e0737`; the merge tree is clean. Environment: Debian 12 x86_64, Python 3.11, Git. I inspected the changed notices, current contribution/convention rules, hosted job log, and current checks. ```sh git diff --check refs/review/current-main...refs/review/12541 git merge-tree --write-tree refs/review/current-main refs/review/12541 python3 tools/check_conventions.py --base refs/review/current-main --head refs/review/12541 gh run view 40749977311 --repo boykopovar/AnyPS5 --job 123033782049 --log ``` ### Results | Check | Result | |---|---| | Merge with current `main` | Clean | | Diff check | Failed: trailing whitespace on added `Math.cpp` line 58 | | Local conventions check | Failed: 17 comment errors | | Hosted conventions check | Failed: 18 errors, including the 17 comment errors and the unchecked template item | | Eligibility, intake, labels, report, Ubuntu/Windows relinker, ASan, and Ubuntu register-context | Passed | | Linux product job | Skipped | | macOS relinker/register-context/write-watch jobs | Still queued | <details><summary>Raw output</summary> ```text core/libs/prx/libc/src/Math.cpp:58: trailing whitespace. + * software is freely granted, provided that this notice 2f6cb2dd6052702b67c99eb1f0fb930711658ef1 ``` The local conventions command ended with: ```text 17 findings, 17 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` The hosted log ended with: ```text ##[error]Comments are only for technical debt, so they need a change to docs/dev/TechnicalDebt.md or docs/dev/debt/ in the same pull request; #endif and namespace ends are always allowed ##[error]Fill in the pull request template: unchecked: No comments in code except technical debt (this PR adds licence notices, which the owner decision exempts) 18 findings, 18 errors; GitHub shows at most 10 error annotations, the job summary lists all ##[error]Process completed with exit code 1. ``` </details> ### Negative control | Assertion | Change made to code under test | Did the new test fail? | |---|---|---| | The conventions checker accepts these notices. | No mutation; I ran the current base-branch checker against the exact PR head. | It failed with 17 comment violations; this is a direct check, not a negative control. | No test or code mutation was run for this documentation/licence-only change. ### Findings **Blocking:** The current `CONTRIBUTING.md` says the conventions check runs for every PR and fails when a rule is broken. The hosted check rejects the added source comments and the unchecked checklist item. The PR description mentions an owner decision but does not link to a recorded exception, and no such decision appears in this PR's discussion. Please provide the maintainer-approved exception in a form the repository checks recognize, or coordinate an accepted policy/checker update; then mark the checklist consistently and rerun conventions. **Blocking:** `git diff --check` reports trailing whitespace at `core/libs/prx/libc/src/Math.cpp:58`. Remove the trailing space and rerun the diff check. **Non-blocking:** I have not yet compared every inserted notice against its cited upstream revision; this review does not certify the notice-to-source mapping. ### Sources - [Contribution rules at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/CONTRIBUTING.md#L47) - [Convention checker comment rule at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/tools/check_conventions.py#L20) - [Added Math.cpp notice line at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/bb4132a403a2dbfcbffad96e024c777db77d7165/core/libs/prx/libc/src/Math.cpp#L58) - [Added SignalList.cpp notice at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/bb4132a403a2dbfcbffad96e024c777db77d7165/core/libs/prx/libSceLibcInternal/SignalList.cpp#L1) ### Not verified I did not build the project or run the author-reported selected tests. I did not independently validate the upstream copyright and licence text across all cited source revisions. Hosted macOS jobs remain queued, and the Linux product job was skipped. ### To get this to a good state Resolve the conventions failure through the repository-approved process, fix the trailing whitespace, and rerun conventions plus `git diff --check`. Please provide links to any maintainer decision that authorizes the exception. I will rerun these same checks against the updated head.
THEMANnt commented 2026-10-29 07:18:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T07:18:35Z.

Review: COMMENTED


Reviewed 17c8f5602121654420da67a62d52f6810824ee00 against cc672fdfc684966d478a9913bde7d90370985c23. Both files change only attribution/license comments; token comparison after removing C/C++ comments confirms the noncomment content is identical. Representative cited FreeBSD siglist, e_sinh and invtrig headers were retrieved and checked for their notices. No executable-code finding.

Validation: complete comment diff and source-token comparison; no runtime test is needed for this comment-only change. git diff --check flags one trailing space in the added Math.cpp notice at line 61, a small cleanup item. The representative header checks do not establish the full provenance of every math routine.

Sources: siglist, e_sinh, invtrig.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694128242 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12541#pullrequestreview-5694128242). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T07:18:35Z. **Review:** COMMENTED --- Reviewed `17c8f5602121654420da67a62d52f6810824ee00` against `cc672fdfc684966d478a9913bde7d90370985c23`. Both files change only attribution/license comments; token comparison after removing C/C++ comments confirms the noncomment content is identical. Representative cited FreeBSD siglist, e_sinh and invtrig headers were retrieved and checked for their notices. No executable-code finding. Validation: complete comment diff and source-token comparison; no runtime test is needed for this comment-only change. git diff --check flags one trailing space in the added Math.cpp notice at line 61, a small cleanup item. The representative header checks do not establish the full provenance of every math routine. Sources: [siglist](https://raw.githubusercontent.com/freebsd/freebsd-src/8c639945a445/lib/libc/gen/siglist.c), [e_sinh](https://raw.githubusercontent.com/freebsd/freebsd-src/release/11.4.0/lib/msun/src/e_sinh.c), [invtrig](https://raw.githubusercontent.com/freebsd/freebsd-src/9f0432041b8f/lib/msun/ld80/invtrig.c).
MarcZX10 commented 2026-10-29 09:41:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T09:41:22Z.

Review: CHANGES_REQUESTED


Re-check — changes requested

The PR description now says the owner approved an exception for source licence notices. I found no linked maintainer decision in this PR's discussion, and the required hosted conventions check still fails on the current head. The exception therefore is not represented in a way the repository's current required check accepts.

I also reran git diff --check against current main; it still reports trailing whitespace in the added Math.cpp notice (line 61 at this head).

Please remove the trailing space and use a repository-recognized path for the licence-notice exception: either link the recorded maintainer decision and update the checker/policy so the required check accepts only the approved notice form, or change the notices to an accepted representation. Then rerun conventions and git diff --check. I have not verified all notice-to-source mappings or run the selected C++ tests.

This review covers exact head 17c8f5602121654420da67a62d52f6810824ee00. The hosted report shows the conventions check failing; Linux product tests are skipped. No functional test is relevant to the comment-only change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5695647620 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12541#pullrequestreview-5695647620). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T09:41:22Z. **Review:** CHANGES_REQUESTED --- # Re-check — changes requested The PR description now says the owner approved an exception for source licence notices. I found no linked maintainer decision in this PR's discussion, and the required hosted `conventions` check still fails on the current head. The exception therefore is not represented in a way the repository's current required check accepts. I also reran `git diff --check` against current `main`; it still reports trailing whitespace in the added `Math.cpp` notice (line 61 at this head). Please remove the trailing space and use a repository-recognized path for the licence-notice exception: either link the recorded maintainer decision and update the checker/policy so the required check accepts only the approved notice form, or change the notices to an accepted representation. Then rerun conventions and `git diff --check`. I have not verified all notice-to-source mappings or run the selected C++ tests. This review covers exact head `17c8f5602121654420da67a62d52f6810824ee00`. The hosted report shows the conventions check failing; Linux product tests are skipped. No functional test is relevant to the comment-only change.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12541
No description provided.