Opened 7 years ago

Closed 2 weeks ago

#4493 closed defect (expired)

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




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 7 years ago.

Download all attachments as: .zip

Change History (4)

by leecher2, 7 years ago

Attachment: remove-ldl-nonlinux.diff added

comment:1 by khimtiki, 7 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, 7 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 :)

comment:3 by Opti, 2 weeks ago

Resolution: expired
Status: newclosed
Note: See TracTickets for help on using tickets.