Add --ldflags configure option (#3545)

* updated README.md

* Create close-inactive-issues.yml

* Add --ldflags configure option

Add --ldflags configure option to allow the user to provide additional
flags to the linker such as -latomic. This will avoid the following
build failure with ActiveRecord on sparc v8:

/home/peko/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/peko/autobuild/instance-1/output-1/build/poco-1.11.1/ActiveRecord/Compiler/obj/Linux/sparc/release_shared/Compiler.o: in function `Poco::RefCountedObject::release() const':
Compiler.cpp:(.text._ZNK4Poco16RefCountedObject7releaseEv[_ZNK4Poco16RefCountedObject7releaseEv]+0xc): undefined reference to `__atomic_fetch_sub_4'

Fixes:
 - http://autobuild.buildroot.org/results/b01/b014d6fcb8fdf28984d7ce606db2347b0265bc6a/build-end.log

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
This commit is contained in:
Fabrice Fontaine 2022-05-26 16:03:48 +02:00 committed by GitHub
parent dbf3a589df
commit a91a5bd746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,19 @@
name: Close inactive issues
on:
schedule:
- cron: "30 2 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
days-before-issue-stale: 365
days-before-issue-close: 60
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 365 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 60 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,6 +1,7 @@
![alt text][logo]
[![poco-ci](https://github.com/pocoproject/poco/actions/workflows/ci.yml/badge.svg?branch=poco-1.11.2)](https://github.com/pocoproject/poco/actions/workflows/ci.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/370/badge)](https://bestpractices.coreinfrastructure.org/projects/370)

View File

@ -286,7 +286,7 @@ endif
COMMONFLAGS = -DPOCO_BUILD_HOST='"'$(HOSTNAME)'"' -DPOCO_TARGET_OSNAME='"'$(OSNAME)'"' -DPOCO_TARGET_OSARCH='"'$(OSARCH)'"' $(POCO_FLAGS)
CFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
CXXFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
LINKFLAGS += $(COMMONFLAGS) $(SYSFLAGS)
LINKFLAGS += $(COMMONFLAGS) $(SYSFLAGS) $(POCO_LDFLAGS)
ifeq ($(OSARCH_64BITS),1)
CFLAGS += $(CFLAGS64)

10
configure vendored
View File

@ -122,6 +122,10 @@ Options:
Pass additional flags to compiler.
Example: --cflags=-wall
--ldflags=<flags>
Pass additional flags to linker.
Example: --ldflags=-latomic
--poquito
Omit a few features for smaller codesize when linking
statically for embedded targets.
@ -154,6 +158,7 @@ tests=1
samples=1
noprefix=0
flags=""
ldflags=""
includepath=""
librarypath=""
odbclib=""
@ -209,6 +214,9 @@ while [ $# -ge 1 ]; do
--cflags=*)
flags="$flags `echo ${1} | awk '{print substr($0,10)}'`" ;;
--ldflags=*)
ldflags="$ldflags `echo ${1} | awk '{print substr($0,11)}'`" ;;
--no-samples)
samples="" ;;
@ -327,6 +335,7 @@ echo "POCO_CONFIG = $config" >>$build/config.make
echo "POCO_BASE = $base" >>$build/config.make
echo "POCO_BUILD = $build" >>$build/config.make
echo "POCO_FLAGS = $flags" >>$build/config.make
echo "POCO_LDFLAGS = $ldflags" >>$build/config.make
if [ -n "$prefix" ] ; then
echo "POCO_PREFIX = $prefix" >>$build/config.make
fi
@ -370,6 +379,7 @@ export POCO_CONFIG
export POCO_BASE
export POCO_BUILD
export POCO_FLAGS
export POCO_LDFLAGS
__EOF__
if [ -n "$prefix" ] ; then