Description: Respect --no-profopt, so you can do -O3 --shared
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: https://bitbucket.org/pypy/pypy/commits/c47d0915382687a85b402c0bf12e486ddb68b01e

--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -240,7 +240,8 @@
                 raise Exception("Cannot use the --output option with PyPy "
                                 "when --shared is on (it is by default). "
                                 "See issue #1971.")
-            if config.translation.profopt is not None:
+            if (config.translation.profopt is not None
+                    and not config.translation.noprofopt):
                 raise Exception("Cannot use the --profopt option "
                                 "when --shared is on (it is by default). "
                                 "See issue #2398.")
