OS/2, eCS & ArcaOS - Technical > Programming

gcc - building libarchive

<< < (2/3) > >>

Lars:
I was given this shell script to create the makefiles for a cmake based project (where the source is located in ..\git directory), to be called from the "build" directory:

export LDFLAGS='-Zhigh-mem -Zomf -lcx -lpthread'
export CFLAGS='-Zomf -O2 -g -march=pentium4 -Wno-attributes'

cmake  -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \
    -DCMAKE_BUILD_TYPE:STRING=debug \
    ../git

Shouldn't that do the trick ? Might need to adjust the cmake defines for your case.

Dave Yeo:

--- Quote from: Lars on February 05, 2022, 11:55:05 pm ---I was given this shell script to create the makefiles for a cmake based project (where the source is located in ..\git directory), to be called from the "build" directory:

export LDFLAGS='-Zhigh-mem -Zomf -lcx -lpthread'
export CFLAGS='-Zomf -O2 -g -march=pentium4 -Wno-attributes'

cmake  -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \
    -DCMAKE_BUILD_TYPE:STRING=debug \
    ../git

Shouldn't that do the trick ? Might need to adjust the cmake defines for your case.

--- End quote ---

It had both cmake and auto tools building. I don't know cmake.
Your script is slightly broken depending. With CFLAGS=-Zomf, creating static libs will fail unless you also put into the environment AR=emxomfld and RANLIB=echo, not sure if cmake uses the environment for those and not everything builds static libs. Also -g should be both in CFLAGS and LDFLAGS as far as I know.
I've also been using -mtune=generic so it is not optimized for Pentium 4 but rather the common CPU's

Andi B.:

--- Quote from: Dave Yeo on February 04, 2022, 11:47:10 pm ---Built for me with make LDFLAGS=-lpthread V=1 haven't looked at configure closely though it looks like it just checks for pthread.h without actually linking it.

--- End quote ---
Thanks that did the trick. Had to remove some other xxFLAGS I tried before and sh ./configure. But now it seems to work.

Next step, try to build iii-0.3 (libarchive is a requirement for that).

Jochen Schäfer:
I looked at libarchive, too, but it needs support for OS/2 EAs.

Dave Yeo:
Ideally would be an xttrs command/function, that way things like this would just work.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version