dev86 commit: 2f41e7dd02
host machine: 6.12.74+deb13+1-amd64
I'm currently trying to set up a cross-compiler toolchain to allow me to build the MINIX 1 tree, targeting an 8088 XT, on a modern x86-64 machine. I've run into some issues when trying to create a library with ar86. Here's a minimal example:
TOOLS_DIR=~/dev86/bin
CC=$TOOLS_DIR/bcc
AS=$TOOLS_DIR/as86
AR=$TOOLS_DIR/ar86
SOURCE=./foo.c
AS_OUT=./foo.s
OBJ_OUT=./foo.o
LIBFILE=./libfoo.a
cat << EOF > $SOURCE
int foo(void) {
return 42;
}
EOF
$CC -0 -S -ansi $SOURCE -o $AS_OUT
$AS -0 -o $OBJ_OUT $AS_OUT
rm -f $LIBFILE
$AR r $LIBFILE $OBJ_OUT
echo "adding symbol index"
$AR s $LIBFILE
It produces the following output, throwing an error when trying to add the symbol index to the archive:
$ bash run.sh
Creating archive file `./libfoo.a'
adding symbol index
~/dev86/bin/ar86: bad format (not an object file) in ./libfoo.a(foo.o)
I will continue to look further into this and don't mind submitting a patch if needed, but any help/ideas would be appreciated
dev86 commit: 2f41e7dd020dd0997bad64094ad8e416ea5ad1ad
host machine: 6.12.74+deb13+1-amd64
I'm currently trying to set up a cross-compiler toolchain to allow me to build the MINIX 1 tree, targeting an 8088 XT, on a modern x86-64 machine. I've run into some issues when trying to create a library with `ar86`. Here's a minimal example:
```bash
TOOLS_DIR=~/dev86/bin
CC=$TOOLS_DIR/bcc
AS=$TOOLS_DIR/as86
AR=$TOOLS_DIR/ar86
SOURCE=./foo.c
AS_OUT=./foo.s
OBJ_OUT=./foo.o
LIBFILE=./libfoo.a
cat << EOF > $SOURCE
int foo(void) {
return 42;
}
EOF
$CC -0 -S -ansi $SOURCE -o $AS_OUT
$AS -0 -o $OBJ_OUT $AS_OUT
rm -f $LIBFILE
$AR r $LIBFILE $OBJ_OUT
echo "adding symbol index"
$AR s $LIBFILE
```
It produces the following output, throwing an error when trying to add the symbol index to the archive:
```
$ bash run.sh
Creating archive file `./libfoo.a'
adding symbol index
~/dev86/bin/ar86: bad format (not an object file) in ./libfoo.a(foo.o)
```
I will continue to look further into this and don't mind submitting a patch if needed, but any help/ideas would be appreciated