mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 02:08:30 +00:00
Stop using .com extension in monorepo
The WIN32 CreateProcess() function does not require an .exe or .com suffix in order to spawn an executable. Now that we have Cosmo bash we're no longer so dependent on the cmd.exe prompt.
This commit is contained in:
parent
c8383f25b4
commit
a6baba1b07
239 changed files with 2092 additions and 2244 deletions
|
@ -29,7 +29,7 @@ You now have an [actually portable
|
|||
executable](https://justine.lol/ape.html) that'll run on your host
|
||||
system. If anything goes wrong, see the Gotchas and Troubleshoot
|
||||
sections below. It should have also outputted two ELF executables as
|
||||
well, named `hello.com.dbg` (x86-64 Linux ELF) and `hello.aarch64.elf`
|
||||
well, named `hello.dbg` (x86-64 Linux ELF) and `hello.aarch64.elf`
|
||||
(AARCH64 Linux ELF). On Linux systems, those files are also runnable,
|
||||
which is useful for easily running programs in GDB. On other OSes GDB
|
||||
can still debug APE programs if the ELF is loaded in a second step using
|
||||
|
@ -163,10 +163,10 @@ being passed to the freestanding Linux compiler.
|
|||
(cd /home/jart/cosmocc; bin/aarch64-linux-cosmo-gcc -o/tmp/fatcosmocc.w48k03qgw8692.o -D__COSMOPO...
|
||||
(cd /home/jart/cosmocc; bin/fixupobj /tmp/fatcosmocc.i5lugr6bc0gu0.o)
|
||||
(cd /home/jart/cosmocc; bin/fixupobj /tmp/fatcosmocc.w48k03qgw8692.o)
|
||||
(cd /home/jart/cosmocc; bin/x86_64-linux-cosmo-gcc -o/tmp/fatcosmocc.ovdo2nqvkjjg3.com.dbg c...
|
||||
(cd /home/jart/cosmocc; bin/x86_64-linux-cosmo-gcc -o/tmp/fatcosmocc.ovdo2nqvkjjg3.dbg c...
|
||||
(cd /home/jart/cosmocc; bin/aarch64-linux-cosmo-gcc -o/tmp/fatcosmocc.d3ca1smuot0k0.aarch64.elf /...
|
||||
(cd /home/jart/cosmocc; bin/fixupobj /tmp/fatcosmocc.d3ca1smuot0k0.aarch64.elf)
|
||||
(cd /home/jart/cosmocc; bin/fixupobj /tmp/fatcosmocc.ovdo2nqvkjjg3.com.dbg)
|
||||
(cd /home/jart/cosmocc; bin/fixupobj /tmp/fatcosmocc.ovdo2nqvkjjg3.dbg)
|
||||
(cd /home/jart/cosmocc; bin/apelink -l bin/ape.elf -l bin/ape.aarch64 -...
|
||||
(cd /home/jart/cosmocc; bin/pecheck hello)
|
||||
```
|
||||
|
@ -269,7 +269,7 @@ The `cosmoaddr2line` program may be used to print backtraces, based on
|
|||
DWARF data, whenever one of your programs reports a crash. It accepts as
|
||||
an argument the ELF executable produced by `cosmocc`, which is different
|
||||
from the APE executable. For example, if `cosmocc` compiles a program
|
||||
named `hello` then you'll need to pass either `hello.com.dbg` (x86-64)
|
||||
named `hello` then you'll need to pass either `hello.dbg` (x86-64)
|
||||
or `hello.aarch64.elf` to cosmoaddr2line to get the backtrace. After the
|
||||
ELf executable comes the program counter (instruction pointer) addresses
|
||||
which are easily obtained using `__builtin_frame_address(0)`. Cosmo can
|
||||
|
|
|
@ -163,13 +163,6 @@ for x; do
|
|||
# this toolchain is intended for building other people's code
|
||||
# elevating warnings into errors, should only be done by devs
|
||||
continue
|
||||
elif [ x"$x" = x"-march=native" ]; then
|
||||
if [ $CROSS -eq 0 ]; then
|
||||
set -- "$@" $("$BIN/march-native")
|
||||
else
|
||||
fatal_error "-march=native can't be used when cross compiling"
|
||||
fi
|
||||
continue
|
||||
elif [ x"$x" = x"-dumpversion" ]; then
|
||||
echo $GCC_VERSION
|
||||
exit 0
|
||||
|
|
|
@ -16,7 +16,7 @@ mode() {
|
|||
}
|
||||
|
||||
OUTDIR=${1:-cosmocc}
|
||||
APELINK=o/$(mode)/tool/build/apelink.com
|
||||
APELINK=o/$(mode)/tool/build/apelink
|
||||
AMD64=${2:-x86_64}
|
||||
ARM64=${3:-aarch64}
|
||||
GCCVER=12.3.0
|
||||
|
@ -35,17 +35,17 @@ make -j32 m=$AMD64 \
|
|||
o/$AMD64/ape/ape-no-modify-self.o \
|
||||
o/$AMD64/cosmopolitan.a \
|
||||
o/$AMD64/third_party/libcxx/libcxx.a \
|
||||
o/$AMD64/tool/build/assimilate.com.dbg \
|
||||
o/$AMD64/tool/build/march-native.com.dbg \
|
||||
o/$AMD64/tool/build/mktemper.com.dbg \
|
||||
o/$AMD64/tool/build/fixupobj.com.dbg \
|
||||
o/$AMD64/tool/build/zipcopy.com.dbg \
|
||||
o/$AMD64/tool/build/mkdeps.com.dbg \
|
||||
o/$AMD64/tool/build/zipobj.com.dbg \
|
||||
o/$AMD64/tool/build/apelink.com.dbg \
|
||||
o/$AMD64/tool/build/pecheck.com.dbg \
|
||||
o/$AMD64/third_party/make/make.com.dbg \
|
||||
o/$AMD64/third_party/ctags/ctags.com.dbg
|
||||
o/$AMD64/tool/build/assimilate.dbg \
|
||||
o/$AMD64/tool/build/march-native.dbg \
|
||||
o/$AMD64/tool/build/mktemper.dbg \
|
||||
o/$AMD64/tool/build/fixupobj.dbg \
|
||||
o/$AMD64/tool/build/zipcopy.dbg \
|
||||
o/$AMD64/tool/build/mkdeps.dbg \
|
||||
o/$AMD64/tool/build/zipobj.dbg \
|
||||
o/$AMD64/tool/build/apelink.dbg \
|
||||
o/$AMD64/tool/build/pecheck.dbg \
|
||||
o/$AMD64/third_party/make/make.dbg \
|
||||
o/$AMD64/third_party/ctags/ctags.dbg
|
||||
|
||||
make -j32 m=$ARM64 \
|
||||
o/$ARM64/ape/ape.elf \
|
||||
|
@ -55,17 +55,17 @@ make -j32 m=$ARM64 \
|
|||
o/$ARM64/ape/ape-no-modify-self.o \
|
||||
o/$ARM64/cosmopolitan.a \
|
||||
o/$ARM64/third_party/libcxx/libcxx.a \
|
||||
o/$ARM64/tool/build/assimilate.com.dbg \
|
||||
o/$ARM64/tool/build/march-native.com.dbg \
|
||||
o/$ARM64/tool/build/mktemper.com.dbg \
|
||||
o/$ARM64/tool/build/fixupobj.com.dbg \
|
||||
o/$ARM64/tool/build/zipcopy.com.dbg \
|
||||
o/$ARM64/tool/build/mkdeps.com.dbg \
|
||||
o/$ARM64/tool/build/zipobj.com.dbg \
|
||||
o/$ARM64/tool/build/apelink.com.dbg \
|
||||
o/$ARM64/tool/build/pecheck.com.dbg \
|
||||
o/$ARM64/third_party/make/make.com.dbg \
|
||||
o/$ARM64/third_party/ctags/ctags.com.dbg
|
||||
o/$ARM64/tool/build/assimilate.dbg \
|
||||
o/$ARM64/tool/build/march-native.dbg \
|
||||
o/$ARM64/tool/build/mktemper.dbg \
|
||||
o/$ARM64/tool/build/fixupobj.dbg \
|
||||
o/$ARM64/tool/build/zipcopy.dbg \
|
||||
o/$ARM64/tool/build/mkdeps.dbg \
|
||||
o/$ARM64/tool/build/zipobj.dbg \
|
||||
o/$ARM64/tool/build/apelink.dbg \
|
||||
o/$ARM64/tool/build/pecheck.dbg \
|
||||
o/$ARM64/third_party/make/make.dbg \
|
||||
o/$ARM64/third_party/ctags/ctags.dbg
|
||||
|
||||
mkdir -p "$OUTDIR/bin/"
|
||||
cp tool/cosmocc/README.md "$OUTDIR/"
|
||||
|
@ -152,8 +152,8 @@ for x in assimilate march-native mktemper fixupobj zipcopy apelink pecheck mkdep
|
|||
-l o/$ARM64/ape/ape.elf \
|
||||
-M ape/ape-m1.c \
|
||||
-o "$OUTDIR/bin/$x" \
|
||||
o/$AMD64/tool/build/$x.com.dbg \
|
||||
o/$ARM64/tool/build/$x.com.dbg
|
||||
o/$AMD64/tool/build/$x.dbg \
|
||||
o/$ARM64/tool/build/$x.dbg
|
||||
done
|
||||
for x in make ctags; do
|
||||
ape $APELINK \
|
||||
|
@ -161,6 +161,6 @@ for x in make ctags; do
|
|||
-l o/$ARM64/ape/ape.elf \
|
||||
-M ape/ape-m1.c \
|
||||
-o "$OUTDIR/bin/$x" \
|
||||
o/$AMD64/third_party/$x/$x.com.dbg \
|
||||
o/$ARM64/third_party/$x/$x.com.dbg
|
||||
o/$AMD64/third_party/$x/$x.dbg \
|
||||
o/$ARM64/third_party/$x/$x.dbg
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue