Opened 5 years ago

Last modified 5 years ago

#4493 new defect

Avoid using -ldl on platforms other than Linux

Reported by: leecher2 Owned by:
Priority: trivial Component: General
Severity: medium Keywords: ldl, link, openbsd, netbsd
Cc: Sensitive: no

Description

Revision

11273

Issue Description

Link flag -ldl is a linuxism and should be restricted only to linux builds.

Please consider the attached patch.

When the issue occurs

Link time

How the issue is reproducable

Build using make/gmake on platforms other than Linux

Attachments (1)

remove-ldl-nonlinux.diff (473 bytes ) - added by leecher2 5 years ago.

Download all attachments as: .zip

Change History (3)

by leecher2, 5 years ago

Attachment: remove-ldl-nonlinux.diff added

comment:1 by khimtiki, 5 years ago

Huh! IMHO very good improvement. It works for me during cross compilation on Linux for FreeBSD systems without manual changing -ldl in Makefile as fine as compiling under pure bare metal FreeBSD machine.
No problem with cross compiling for Linux based architectures (eg. mipsel, sh4, arm) also.
This should be trunked ;)

comment:2 by enigma13, 5 years ago

In the same time it would be great to correct the SCPC compilation option under Cygwin (windows plattform).
Documentation says compile via :
make cygwin USE_PCSC=1
and to have success compilation we must done :
make cygwin USE_PCSC=1 PCSC_LIB="-lwinscard" .
Please notice some improvements under cygwin last year, 32 and 64 bits compilations possibles now :)

Note: See TracTickets for help on using tickets.