- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

---

I tried build the gpac latest commit (9a79be3f647d2acbf570ef1b9bcdfb6c5102b4df,  Fri Jan 14 19:28:16 2022) with sanitizer enabled. However, the compilation failed due to undefined reference to _DYNAMIC.
Detailed fail results are sth like the following:
```bash
make[1]: Leaving directory '/src/projects/gpac-9a79be3f64/gpac/src'
make -C applications all
make[1]: Entering directory '/src/projects/gpac-9a79be3f64/gpac/applications'
set -e; for i in gpac mp4box  ; do make -C $i all; done
make[2]: Entering directory '/src/projects/gpac-9a79be3f64/gpac/applications/gpac'
  CC main.c
afl-cc ++3.12c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
SanitizerCoveragePCGUARD++3.12c
[+] Instrumented 1898 locations with no collisions (non-hardened mode).
afl-cc ++3.12c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
/usr/bin/ld: /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_linux.cpp.o): in function `__asan::AsanDoesNotSupportStaticLinkage()':
(.text._ZN6__asan31AsanDoesNotSupportStaticLinkageEv+0x3): undefined reference to `_DYNAMIC'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:56: gpac] Error 1
make[2]: Leaving directory '/src/projects/gpac-9a79be3f64/gpac/applications/gpac'
make[1]: *** [Makefile:41: apps] Error 2
```

I mainly follow this [wiki](https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux#mp4box-only) and here are the build commands:
```bash
./configure --static-mp4box --prefix=./install --enable-sanitizer --enable-afl --enable-afl-clang --cc=afl-clang-fast --cxx=afl-clang-fast++
make
```

May you help on this? Thank you.
Build error when enable sanitizer option in latest commit code
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Build error when enable sanitizer option in latest commit code
Issue date:

--- start body ---
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

---

I tried build the gpac latest commit (9a79be3f647d2acbf570ef1b9bcdfb6c5102b4df,  Fri Jan 14 19:28:16 2022) with sanitizer enabled. However, the compilation failed due to undefined reference to _DYNAMIC.
Detailed fail results are sth like the following:
```bash
make[1]: Leaving directory '/src/projects/gpac-9a79be3f64/gpac/src'
make -C applications all
make[1]: Entering directory '/src/projects/gpac-9a79be3f64/gpac/applications'
set -e; for i in gpac mp4box  ; do make -C $i all; done
make[2]: Entering directory '/src/projects/gpac-9a79be3f64/gpac/applications/gpac'
  CC main.c
afl-cc ++3.12c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
SanitizerCoveragePCGUARD++3.12c
[+] Instrumented 1898 locations with no collisions (non-hardened mode).
afl-cc ++3.12c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
/usr/bin/ld: /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_linux.cpp.o): in function `__asan::AsanDoesNotSupportStaticLinkage()':
(.text._ZN6__asan31AsanDoesNotSupportStaticLinkageEv+0x3): undefined reference to `_DYNAMIC'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:56: gpac] Error 1
make[2]: Leaving directory '/src/projects/gpac-9a79be3f64/gpac/applications/gpac'
make[1]: *** [Makefile:41: apps] Error 2
```

I mainly follow this [wiki](https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux#mp4box-only) and here are the build commands:
```bash
./configure --static-mp4box --prefix=./install --enable-sanitizer --enable-afl --enable-afl-clang --cc=afl-clang-fast --cxx=afl-clang-fast++
make
```

May you help on this? Thank you.
--- end body ---
