--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gdc -debuglib not supported
- From: Witold Baryluk <witold.baryluk@gmail.com>
- Date: Wed, 29 Apr 2020 21:31:50 +0200
- Message-id: <158818871008.2120941.13131471721024976063.reportbug@wielkiczarny>
Package: gdc
Version: 4:9.2.1-3.1
Severity: normal
According to man page for gdc(1):
-debuglib
Specify the debug library to use instead of libphobos when linking. This option
has no effect unless the -g option was also given on the command line. Options
specifying the linkage of libphobos, such as -static-libphobos or
-shared-libphobos, are ignored.
$ gdc -debuglib -Wall -ggdb -O2 search.d
d21: warning: unrecognized gcc debugging option: e
d21: warning: unrecognized gcc debugging option: b
d21: warning: unrecognized gcc debugging option: u
d21: warning: unrecognized gcc debugging option: g
d21: warning: unrecognized gcc debugging option: l
d21: warning: unrecognized gcc debugging option: i
d21: warning: unrecognized gcc debugging option: b
$
AFAIK Debian doesn't provide the debug library (phobos and druntime
compiled with debug options and extra debug assertions and unittest).
libgphobos76-dbgsym is not a 'debug library', these are debug symbols for
normal (optimized) phobos and druntime library.
Even then, the -debuglib should be regognized, or maybe removed from the
manpage for gdc(1) and gdc-9(1)? I can't find any info about -debuglib in
gdc --help=common or in gdc --help=d.
https://wiki.dlang.org/Using_GDC lists that there is option -debuglib=<path>
dmd-script supposedly also supports it https://github.com/D-Programming-GDC/gdmd/blob/master/dmd-script
I also looked at upstreadm GCC sources, and it should be supported:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/d/d-spec.cc;h=f4744763ab617e3adf762ca0a791a512597b0fa8;hb=HEAD#l172
But reading the source and reading between the lines of the manpage,
maybe it should be stated in the manpage as '-debuglib libname', similar
to '-defaultlib libname'?
Regards,
Witold
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.5.0-2-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gdc depends on:
ii gdc-9 9.3.0-11
ii libgphobos-dev 9.2.1-3.1
gdc recommends no packages.
gdc suggests no packages.
-- no debconf information
--- End Message ---