--
--
http://groups.google.com/group/cloudy-dev
---
You received this message because you are subscribed to the Google Groups "cloudy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudy-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/b8ddfece-a2d4-4c9b-9add-0b517aa30f4en%40googlegroups.com.
How can we have missed this?
https://clang.llvm.org/docs/ClangCommandLineReference.html#target-independent-compilation-options
It looks like it exists, but capitalized.
-fPIC, -fno-PIC
-fPIE, -fno-PIE
-faccess-control, -fno-access-control
-faddrsig, -fno-addrsig
Emit an address-significance table
Maybe try this?
$ git diff capabilities.pl
diff --git a/source/capabilities.pl b/source/capabilities.pl
index 499a5ff..1a1cf27 100755
--- a/source/capabilities.pl
+++ b/source/capabilities.pl
@@ -62,7 +62,7 @@ if( "$^O" ne "cygwin" ) {
unlink "tmp_cloudyconfig.out";
# test if the -no-pie and -fno-pie flags are supported
if( $compiler eq "clang" || $os =~ /Darwin/ ) {
- $npflags = "-fno-pie";
+ $npflags = "-fno-PIE";
}
else {
$npflags = "-no-pie -fno-pie";
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFRO7YHb1hQMXD5YQFAD_hJRy%2BtY691-js2y7MX7J1A0TQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/412c7ffd-4d42-ced9-a2d8-a0d14526ae55%40gmail.com.
It looks like it. The Perl script has the flag in lower case,
referring probably to an earlier version.
Does it work?
If it does, we need to add logic to the script to discriminate
the compiler version.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFRR31oCuPWHRw6XCeWn6pr3iYKuJTaN%2B7mf52To9Lcqxw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/4a6a6e19-3cc1-1fc9-dd94-4a208eeaf6cd%40gmail.com.
I would think we do. It amounts to the difference between building a static vs a dynamic library. It is possible no-pie (static) is the default...
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFSziLXt6F-KrNCHs4ze8_m8_VDgSsw%2BMBxDLgVERnzZ7A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/996bbae2-bb9d-2abe-7c57-ef1a64c78ffc%40gmail.com.
Compilation ought to do this, so we know it works. That said, it might be better to be explicit than go with the default.
The flag is there for a reason. I'd look into compiler versions.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFSKeK0s8DqxgNT2TxHGcBjLzBwJBcnyHf-ef%3DsO-oE8sA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/8100594d-11fc-e06e-6b1d-ea56e3359fe9%40gmail.com.
The main ones I could find -- other commits were probably on the backtrace branch. Not terribly helpful, but still.
$ svn log -r 12423
------------------------------------------------------------------------
r12423 | peter | 2018-11-27 17:50:21 -0500 (Tue, 27 Nov
2018) | 5 lines
source/Makefile:
source/capabilities.pl:
- Improve code for disabling position independent
executables. The -no-pie flag
is only supported from g++ 6 onwards, so do not break
older compilers.
$ svn log -r 12453
------------------------------------------------------------------------
r12453 | peter | 2018-12-09 18:24:21 -0500 (Sun, 09 Dec
2018) | 12 lines
This is the second merge from the backtrace branch. It
implements "fixing"
missing or empty save files from a certain grid point
(due to a crash of some
sort) by creating a stub version of the file from another
successful grid
point. This is done by replacing all digits from the
successful file with
zeroes.
Support for backtraces is improved on Macs. In the case
of an FP exception or
segfault, the address of the location where the signal
was generated is now
correctly substituted in the call stack. The Homebrew g++
compiler will now
produce a correct backtrace in debug mode (but still
nothing in optimized
mode).
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFSELVbXckG-hSuWngCfyaX5BfR5eJWdxwY5Yv%2B5%2BKc4wA%40mail.gmail.com.
Actually, the simplest thing to do might be to just add the
capitalized string, instead of going down the compiler version
road. The Makefile needs to be adjusted, too.
$ git diff capabilities.pl Makefile
diff --git a/source/Makefile b/source/Makefile
index 237da7d..96bc9e2 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -57,7 +57,7 @@ CAPABILITIES := $(shell
$(SRCDIR)/capabilities.pl $(CXX))
PRECOMPILE := $(filter precompile,$(CAPABILITIES))
VECTORIZE := $(filter vectorize,$(CAPABILITIES))
NOPIE := $(filter -no-pie,$(CAPABILITIES))
-FNOPIE := $(filter -fno-pie,$(CAPABILITIES))
+FNOPIE := $(filter -fno-pie -fno-PIE,$(CAPABILITIES))
NATIVE := $(filter native,$(CAPABILITIES))
DYNAMIC := $(filter dynamic,$(CAPABILITIES))
DEMANGLE := $(filter demangle%,$(CAPABILITIES))
diff --git a/source/capabilities.pl
b/source/capabilities.pl
index 499a5ff..d15afb0 100755
--- a/source/capabilities.pl
+++ b/source/capabilities.pl
@@ -62,7 +62,7 @@ if( "$^O" ne "cygwin" ) {
unlink "tmp_cloudyconfig.out";
# test if the -no-pie and -fno-pie flags are supported
if( $compiler eq "clang" || $os =~ /Darwin/ ) {
- $npflags = "-fno-pie";
+ $npflags = "-fno-pie -fno-PIE";
}
else {
$npflags = "-no-pie -fno-pie";
This did not generate warnings for me with clang on my very old
Mac. Give it a shot?
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/aa06071c-6b29-f853-3251-8f25a9a3ea9d%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/CAOxTjFSO9bmWJGbobsTh%3DBGmPTqn38JF6m2HS-K6roj-bJmnyQ%40mail.gmail.com.