Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnome module: g-ir-scanner extend cflags filter for '-m' #10875

Open
cgrzemba opened this issue Sep 30, 2022 · 0 comments
Open

gnome module: g-ir-scanner extend cflags filter for '-m' #10875

cgrzemba opened this issue Sep 30, 2022 · 0 comments

Comments

@cgrzemba
Copy link

cgrzemba commented Sep 30, 2022

gnome module filters CFLAGS for call g-ir-scanner. Currentls it let pass options started with -D, -U -I .

If in CPPFLAGS option -m64 is set, it will filter out.

If the GCC does not compile 64bit by default, compiling will fail, even if option '-m64' is set.

The following change would pass the option to g-ir-scanner:

--- gnome.py    Sat Sep  3 14:45:43 2022
+++ gnome.py.0  Tue Sep 27 10:49:16 2022
@@ -1065,7 +1065,7 @@
         for f in cflags:
             # _FORTIFY_SOURCE depends on / works together with -O, on the other hand this
             # just invokes the preprocessor anyway
-            if f.startswith(('-D', '-U', '-I')) and not f.startswith('-D_FORTIFY_SOURCE'):
+            if f.startswith(('-D', '-U', '-I', '-m')) and not f.startswith('-D_FORTIFY_SOURCE'):
                 yield f
 
     @staticmethod

I used gcc 7. The compiler will still produce 32bit code if option -m64 is not set.

  • what operating system: OpenIndiana (Illumos, OpenSolaris)
  • what Python version are you using: 3.9
  • what meson --version: 0.63.2
  • what ninja --version : 1.11.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant