Without this patch static linking fails due to multiple undefined
references:
/usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libnewt.a(form.o):infunction`Gpm_Open.part.0.constprop.0':(.text+0x38c):warning:theuseof`tempnam' is dangerous, better use `mkstemp'/usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libnewt.a(newt.o):infunction`wchar_to_textmod_visual.constprop.0':(.text+0xa53):undefinedreferenceto`dlerror'/usr/bin/ld:(.text+0xa72):undefinedreferenceto`dlsym'/usr/bin/ld:(.text+0xe55):undefinedreferenceto`dlopen'/usr/bin/ld:(.text+0xe6d):undefinedreferenceto`dlerror'/usr/bin/ld:(.text+0xe7e):undefinedreferenceto`dlopen'/usr/bin/ld:(.text+0xe96):undefinedreferenceto`dlerror'/usr/bin/ld:(.text+0xf83):undefinedreferenceto`dlclose'/usr/bin/ld:(.text+0xfa5):undefinedreferenceto`dlerror'/usr/bin/ld:(.text+0xfe1):undefinedreferenceto`dlclose'/usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libnewt.a(newt.o):infunction`write_string_int':(.text+0x1267):undefinedreferenceto`SLsmg_write_string'/usr/bin/ld:(.text+0x12ae):undefinedreferenceto`SLsmg_write_string'/usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libnewt.a(newt.o):infunction`write_nstring_int':(.text+0x1398):undefinedreferenceto`SLsmg_write_nstring'/usr/bin/ld:(.text+0x13e7):undefinedreferenceto`SLsmg_write_nstring'/usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libnewt.a(newt.o):infunction`newtFlushInput':(.text+0x1523):undefinedreferenceto`SLang_input_pending'/usr/bin/ld:(.text+0x1531):undefinedreferenceto`SLang_getkey'/usr/bin/ld:(.text+0x153c):undefinedreferenceto`SLtt_Screen_Rows'/usr/bin/ld:(.text+0x1543):undefinedreferenceto`SLsmg_touch_lines'/usr/bin/ld:(.text+0x1548):undefinedreferenceto`SLsmg_refresh'[248linesskipped]collect2:error:ldreturned1exitstatus
With this patch I can statically link a binary with libnewt without listing
the required libraries manually:
Without this patch static linking fails due to multiple undefined
references:
Closes: #17