8000 Missing -static in CFLAGS? · Issue #215 · AndyGrant/Ethereal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Missing -static in CFLAGS? #215
Open
@mibere

Description

@mibere

Hi Andrew,

the compilation with

mingw32-make pgo

on Windows 10 with MSYS2 CLANG64 (clang: 18.1.8, Target: x86_64-w64-windows-gnu, Thread model: posix) is successful, you can run the created 64bit executable (Ethereal.exe) without problems in the MSYS2 environment.

But, if you try to run the executable outside of the MSYS2 environment there is an error that the libwinpthread-1.dll is missing.

I solved it by changing line 45 in the makefile

CFLAGS   = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native

to

CFLAGS   = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native -static

Or even better here

...
RFLAGS   = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -static
CFLAGS   = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native
TFLAGS   = -O3 $(WFLAGS) -DNDEBUG -flto $(NN) $(NNFLAGS) -march=native -fopenmp -DTUNE
PGOFLAGS = -fno-asynchronous-unwind-tables

ifeq ($(MSYSTEM), CLANG64)
	CFLAGS += -static
endif
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0