On Fri, Mar 05, 2021 at 07:55:36PM +0100, Gerhard Sittig wrote:
> This is a call for testers. Especially on those platforms which
> are not exactly mainstream. That is: anything outside of one of
> the popular Linux distros, which I used in a local setup.
I successfully tested this on Alpine Linux 3.13.2.

  # env CFLAGS=-flto LDFLAGS=-flto ../configure --disable-driver2 
--disable-driver1

  # ./app_combo
  communicating ...
  items:
   0x7f0a56a8ddf0 5 driver5 0x7f0a56a8b345
   0x7f0a56a8ddd0 4 driver4 0x7f0a56a8b320
   0x7f0a56a8ddb0 3 driver3 0x7f0a56a8b2fb
  list end
  driver5, do something
  driver4, do something
  driver3, do something

Same effect without LTO.


I also tested this on OpenBSD 6.8:
  # ../configure --disable-driver2 --disable-driver3 --disable-driver4
  # ./app_combo
  communicating ...
  items:
   0x20ee5d97de0 5 driver5 0x20ee5d96c20
   0x20ee5d97dc0 1 driver1 0x20ee5d96c00
  list end
  driver5, do something
  driver1, do something

  # env CFLAGS=-flto LDFLAGS=-flto ../configure
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... ../build-aux/install-sh -c -d
  checking for gawk... no
  checking for mawk... no
  checking for nawk... no
  checking for awk... awk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking for gawk... (cached) awk
  checking for gcc... gcc
  checking whether the C compiler works... no
  configure: error: in `/home/vm/autotool-experiments/build':
  configure: error: C compiler cannot create executables
  See `config.log' for more details

The relevant parts from config.log:
  configure:3284: checking whether the C compiler works
  configure:3306: gcc -flto  -flto conftest.c  >&5
  cc1: error: unrecognized command line option "-flto"
  cc1: error: unrecognized command line option "-flto"
  configure:3310: $? = 1
  configure:3348: result: no

Seems like the default cc on BSD doesn't support -flto.

HTH


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to