descriptionexplore autotools features
ownergerhard.sittig@gmx.net
last changeWed, 10 May 2023 17:15:49 +0000 (10 19:15 +0200)
content tags
add:
README
research for libsigrok drivers list construction (bug 1433,
spotted by broken LTO builds, turned into no-linker-magic later)

this README is a short summary, the NOTES.txt file has more details

warning to testers, note about compatibility: this repo experiments
with several approaches to the construction of the drivers list,
some of them not stable yet, or not portable enough -- when in doubt
then check the constructors-only version as of commit 75c4a1518306,
to not get affected by non-operational linker section support code

fresh checkout might have to create configure script first
  $ autoreconf -i
out of source build recommended, to hold
several configuration variants in parallel:
  $ mkdir build && cd build
build with or without LTO support enabled:
  $ ../configure
  $ env CFLAGS=-flto LDFLAGS=-flto ../configure
build with drivers enabled/disabled (up to five, enabled by default)
  $ ../configure --disable-driver2
then
  $ make && ./app_combo
curious users want to dump the driver list content
  $ make dump

for cross builds:
  ... similar sequence, but slightly modified ...
  $ ../configure --host=...
  ...
  $ make install DESTDIR=`pwd`/output
  (other machine) > ./output/usr/bin/app_combo

example for multiple parallel configurations:
  $ git clone git://repo.or.cz/autotool-experiments.git
  $ cd autotools-experiments
  $ autoreconf -i
  $ mkdir build-empty && pushd build-empty
  $ ../configure --disable-driver1 --disable-driver2 --disable-driver3 --disable-driver4 --disable-driver5 --disable-driver6 --disable-driver7 --disable-driver8
  $ popd
  $ mkdir build-empty-lto && pushd build-empty-lto
  $ env CFLAGS=-flto LDFLAGS=-flto ../configure --disable-driver1 --disable-driver2 --disable-driver3 --disable-driver4 --disable-driver5 --disable-driver6 --disable-driver7 --disable-driver8
  $ popd
  $ mkdir build-some && pushd build-some
  $ ../configure --disable-driver1 --enable-driver2 --enable-driver3 --disable-driver4 --disable-driver5
  $ popd
  $ mkdir build-some-lto && pushd build-some-lto
  $ env CFLAGS=-flto LDFLAGS=-flto ../configure --disable-driver1 --enable-driver2 --enable-driver3 --disable-driver4 --disable-driver5
  $ popd
  $ mkdir build-all && pushd build-all
  $ ../configure --enable-driver1 --enable-driver2 --enable-driver3 --enable-driver4 --enable-driver5 --enable-driver6 --enable-driver7 --enable-driver8
  $ popd
  $ mkdir build-all-lto && pushd build-all-lto
  $ env CFLAGS=-flto LDFLAGS=-flto ../configure --enable-driver1 --enable-driver2 --enable-driver3 --enable-driver4 --enable-driver5 --enable-driver6 --enable-driver7 --enable-driver8
  $ popd
  $ DIRS="build-empty build-empty-lto build-some build-some-lto build-all build-all-lto"
  $ for D in $DIRS; do make -C $D; done
  $ for D in $DIRS; do echo "directory $D"; ./$D/app_combo; echo ""; done
  $ for D in $DIRS; do make -C $D dump; done

when cmake is preferred over autotools:
  $ mkdir build && cd build
  $ cmake ..
  $ cmake --build . && ./app_combo
to adjust the configurations or cross build:
  $ cmake -DWITH_LTO=ON .
  $ cmake -DWITH_LTO=OFF .
  $ cmake -DWITH_DRIVER_3=OFF -DWITH_DRIVER_5=OFF .
  $ ccmake .
  $ i686-w64-mingw32.static-cmake ..
shortlog
2023-05-10 Gerhard SittigHACK drivers header, dead code/comments on alternative... master
2023-05-10 Gerhard Sittigdriver list: update developer docs (driver 8, cmake...
2023-05-10 Gerhard Sittigdriver list: move more driver presence conditions from...
2023-05-10 Gerhard Sittigdriver list: add source files which register multiple...
2023-05-10 Gerhard Sittigdriver list: unbreak linker script use with cmake build...
2023-05-09 Gerhard Sittigdoc: add warning about lack of portability to top of...
2023-05-09 Gerhard Sittigdriver list: update developer notes for linker script...
2023-05-09 Gerhard Sittigdriver list: hook up linker script to cmake build rules...
2023-05-09 Gerhard Sittigdriver list: use dynamic linking from automake build...
2023-05-09 Gerhard Sittigdriver list: implement iteration over linker section...
2023-05-09 Gerhard Sittigdriver list: dump linker section from automake build...
2023-05-09 Gerhard Sittigdriver list: collect driver desc pointers in linker...
2023-05-09 Gerhard Sittigdriver list: introduce linker script
2023-05-09 Gerhard Sittigdriver list: rename identifiers to reflect "constructor...
2023-05-09 Gerhard Sittigdriver list: comments in drivers.h, inclusion guard...
2023-05-09 Gerhard Sittigdriver list: separate decl for driver desc and linked...
...
heads
17 months ago master