[Issue 5278] gentoo's 'hardended' gcc doesn't work with dmd
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 24 01:34:59 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5278
--- Comment #16 from Chad Joan <chadjoan at gmail.com> 2011-10-24 01:33:51 PDT ---
I'm afraid it doesn't seem to be working.
It went something like this:
chad at Hugin /mnt/bulk/dprojects/helloD2 $ ls
main.d
chad at Hugin /mnt/bulk/dprojects/helloD2 $ cat main.d
import std.stdio;
void main()
{
writefln("hello world!");
}
chad at Hugin /mnt/bulk/dprojects/helloD2 $ dmd
DMD64 D Compiler v2.056
Copyright (c) 1999-2011 by Digital Mars written by Walter Bright
Documentation: http://www.digitalmars.com/d/2.0/index.html
Usage:
dmd files.d ... { -switch }
files.d D source files
@cmdfile read arguments from cmdfile
-c do not link
-cov do code coverage analysis
-D generate documentation
-Dddocdir write documentation file to docdir directory
-Dffilename write documentation file to filename
-d allow deprecated features
-debug compile in debug code
-debug=level compile in debug code <= level
-debug=ident compile in debug code identified by ident
-debuglib=name set symbolic debug library to name
-defaultlib=name set default library to name
-deps=filename write module dependencies to filename
-fPIC generate position independent code
-g add symbolic debug info
-gc add symbolic debug info, pretend to be C
-gs always emit stack frame
-H generate 'header' file
-Hddirectory write 'header' file to directory
-Hffilename write 'header' file to filename
--help print help
-Ipath where to look for imports
-ignore ignore unsupported pragmas
-inline do function inlining
-Jpath where to look for string imports
-Llinkerflag pass linkerflag to link
-lib generate library rather than object files
-man open web browser on manual page
-map generate linker .map file
-noboundscheck turns off array bounds checking for all functions
-nofloat do not emit reference to floating point
-O optimize
-o- do not write object file
-odobjdir write object & library files to directory objdir
-offilename name output file to filename
-op do not strip paths from source file
-profile profile runtime performance of generated code
-property enforce property syntax
-quiet suppress unnecessary messages
-release compile release version
-run srcfile args... run resulting program, passing args
-unittest compile in unit tests
-v verbose
-version=level compile in version code >= level
-version=ident compile in version code identified by ident
-vtls list all variables going into thread local storage
-w enable warnings
-wi enable informational warnings
-X generate JSON file
-Xffilename write JSON file to filename
chad at Hugin /mnt/bulk/dprojects/helloD2 $ dmd main.d -ofmain
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
main.o: relocation R_X86_64_32 against `.data' can not be used when making a
shared object; recompile with -fPIC
main.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
--- errorlevel 1
chad at Hugin /mnt/bulk/dprojects/helloD2 $ ls
main.d main.o
chad at Hugin /mnt/bulk/dprojects/helloD2 $ dmd main.d -ofmain -m32
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
chad at Hugin /mnt/bulk/dprojects/helloD2 $ ls
main main.d main.o
chad at Hugin /mnt/bulk/dprojects/helloD2 $ main
main: error while loading shared libraries: cannot make segment writable for
relocation: Permission denied
chad at Hugin /mnt/bulk/dprojects/helloD2 $ sudo paxctl -m main
chad at Hugin /mnt/bulk/dprojects/helloD2 $ main
Segmentation fault
chad at Hugin /mnt/bulk/dprojects/helloD2 $ ls
main main.d main.o
chad at Hugin /mnt/bulk/dprojects/helloD2 $
(I don't have any other 2.056 D compilers on my system; so the part where I ran
dmd to get the help text should confirm that the correct compiler is in use.)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list