Skip to content

configure-lib: List lib/windows/lseek.c once - #2

Merged
aoinoikaz merged 1 commit into
windows-pe32-ntcallfrom
configure-lib-lseek-once
Nov 3, 2026
Merged

aoinoikaz merged 1 commit into
windows-pe32-ntcallfrom
configure-lib-lseek-once

Conversation

@aoinoikaz

Copy link
Copy Markdown

libmes_SOURCES takes lib/windows/lseek.c for mes_kernel=windows (line 143), as it takes lib/linux/lseek.c for linux, and the Windows block of libc_SOURCES named it a second time (line 306). libc, libc+tcc and libc+gnu, which all start from libmes_SOURCES, therefore defined lseek and _lseek twice. MesCC emits both and hex2 resolves a twice-defined label to the later one, so the libraries MesCC builds were unaffected; a compiler that rejects a redefinition, as TinyCC does, cannot build a library concatenated from the list.

This drops the second entry. The lists regenerated from the fixed tree name each file once: libc 112, libc+tcc 169, gnu 100 + 169.

The Windows CI builds mes-m2 from kaem.windows.run, which does not read configure-lib.sh, so it shows only that nothing else changed.

libmes_SOURCES takes lib/windows/lseek.c for mes_kernel=windows, as it
takes lib/linux/lseek.c and lib/stub/lseek.c for linux and gnu, and the
Windows block of libc_SOURCES named it a second time.  libc, libc+tcc and
libc+gnu, which all start from libmes_SOURCES, therefore defined lseek
and _lseek twice.  MesCC emits both, and hex2 resolves a label defined
twice to the later one, so the libraries MesCC builds were unaffected; a
compiler that rejects a redefinition, as TinyCC does, cannot build a
library concatenated from the list.

* build-aux/configure-lib.sh (libc_SOURCES): Do not list
lib/windows/lseek.c for mes_kernel=windows a second time.
@aoinoikaz
aoinoikaz merged commit 4f939dd into windows-pe32-ntcall Nov 3, 2026
2 checks passed
@aoinoikaz
aoinoikaz deleted the configure-lib-lseek-once branch November 3, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant