/build_ipv4.example.sh (806e7cd5528db2b548b6d379e700e63c62c2255b) (1738 bytes) (mode 100755) (type blob)
#!/bin/sh
# XXX: the compiler driver is brained damaged: have a specific build script for each toolchain.
top_dir=$(realpath "$(dirname "$0")")
printf "TOP_DIR=$top_dir\n"
build_dir="$top_dir/build_ipv4"
printf "BUILD_DIR=$build_dir\n"
cd "$build_dir"
# install our configuration file
cp "$top_dir/config_ipv4.h" "$build_dir/config.h"
# configure ulinux for arm64
rm "$build_dir/ulinux/arch"
rmdir "$build_dir/ulinux"
mkdir "$build_dir/ulinux"
ln -s "$top_dir/lnanomsgbrd/ulinux/archs/aarch64" "$build_dir/ulinux/arch"
# The DEBUG definition, will output "debug stuff" on the stderr (file descriptor 2)
DEBUG=
#DEBUG=-DDEBUG
# cpp the assembler source file and the C source file
gcc -E -o "$build_dir/lnanomsgbrd.s" \
$DEBUG \
-DULINUX_ARM64 \
-DULINUX_ASSEMBLY_SYSCALL \
\
-D__GNUAS__ \
-nostdinc \
"-I$build_dir" \
"-I$top_dir/lnanomsgbrd" \
\
"$top_dir/lnanomsgbrd/lnanomsgbrd.S"
# we must know where the toolchain compiler stores its include files
gcc -E -o "$build_dir/lnanomsgbrd.cpp.c" \
$DEBUG \
-DULINUX_ARM64 \
-DULINUX_ASSEMBLY_SYSCALL \
\
-nostdinc \
-isystem /usr/lib/gcc/aarch64-linux-gnu/6.3.0/include-fixed \
-isystem /usr/lib/gcc/aarch64-linux-gnu/6.3.0/include \
"-I$build_dir" \
"-I$top_dir/lnanomsgbrd" \
\
"$top_dir/lnanomsgbrd/lnanomsgbrd.c"
# generate the assembler from the C file cpp-ed file
gcc -S -o "$build_dir/lnanomsgbrd.cpp.c.s" \
-pipe -O2 -fPIC -fpic \
"$build_dir/lnanomsgbrd.cpp.c"
# assemble
as -o "$build_dir/lnanomsgbrd.cpp.c.s.o" \
"$build_dir/lnanomsgbrd.cpp.c.s"
as -o "$build_dir/lnanomsgbrd.s.o" \
"$build_dir/lnanomsgbrd.s"
# link the file
ld -o "$build_dir/lnanomsgbrd" \
-nostdlib \
"$build_dir/lnanomsgbrd.cpp.c.s.o" \
"$build_dir/lnanomsgbrd.s.o"
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
361 |
ff02095b625086aa58322576800ece5d73ff50a2 |
ABBREVIATIONS |
100644 |
blob |
36 |
c3bef10311fcf424e073dbd601f8385c9579c094 |
COPYRIGHT_DATES |
100644 |
blob |
419 |
6a4e43e0b6c6c6ced1093892fc1c91234e65f618 |
INDEX_RECORD_FORMAT |
100644 |
blob |
34520 |
dbbe3558157f5861bff35dcb37b328b679b0ccfd |
LICENSE |
100644 |
blob |
211 |
229b556770e601178a826a4191012446f48e88df |
NORMATIVE_REFERENCES |
100644 |
blob |
393 |
4a7fdffa154d8c09cac70f46bddd6ddf74b0bd0d |
README |
100644 |
blob |
897 |
8c9b0a359fd5d606e7ecce24829aae94d0012018 |
asm_support.h |
100755 |
blob |
1738 |
806e7cd5528db2b548b6d379e700e63c62c2255b |
build_ipv4.example.sh |
100755 |
blob |
1738 |
0c7e96110cbe5f3ba58b1ce621b3b5588eff9810 |
build_ipv6.example.sh |
100644 |
blob |
90763 |
1bd64bdf5d1ec24d73cb0c71d3a7b4c2c7a155d1 |
cnx.c |
100644 |
blob |
1210 |
25c4111c9a1c12bf61cc3effe531a4941115d33b |
cnx.h |
100644 |
blob |
1104 |
40dd5bcd6e55b953d45fd78e8e717c5d50eb2f91 |
config_ipv4.example.h |
100644 |
blob |
1045 |
8bfb368ffc1cb1aaabf2c4be55ef4591832f2742 |
config_ipv6.example.h |
100644 |
blob |
1433 |
d4d824ed2efb7a0080c43b08ba28841eadba9c38 |
exit_codes.h |
100644 |
blob |
999 |
818566713bb571e8f728c8a9de1675b203ef6ad3 |
global_state.c |
100644 |
blob |
2961 |
62cd2331f988a9fe281e7bb18acc0cdf59dbd3ca |
lnanomsgbrd.S |
100644 |
blob |
233 |
e281d00ca5b2977d7689394d3fe5e0e47c1fe16e |
lnanomsgbrd.c |
040000 |
tree |
- |
60b5bc16e3dcd3804088b7eac1a78ac78e64440b |
namespace |
100644 |
blob |
11191 |
ca878fc99084502f54ddaec6062d4b4f352eb6c4 |
svr.c |
040000 |
tree |
- |
13c2eaa00501c13b79b251ad0af64d3aaebc855c |
ulinux |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/lnanomsgbrd
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/lnanomsgbrd
Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/lnanomsgbrd
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main