Closed Bug 979118 Opened 10 years ago Closed 10 years ago

Add a global MMX_FLAGS and SSE2_FLAGS

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla31

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 files)

Follow-up from bug 978594.

Would those variables go in configure.in?
I would say yes.
I'll do this after a couple of other patches I'm working on.
Assignee: nobody → ehsan
Comment on attachment 8388140 [details] [diff] [review]
Add global MMX_FLAGS, SSE_FLAGS and SSE2_FLAGS variables; r=glandium

https://tbpl.mozilla.org/?tree=Try&rev=cdba536897e9
Attachment #8388140 - Flags: review?(mh+mozilla)
ping?
Comment on attachment 8388140 [details] [diff] [review]
Add global MMX_FLAGS, SSE_FLAGS and SSE2_FLAGS variables; r=glandium

Review of attachment 8388140 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the long wait. I was heads down on something.

::: configure.in
@@ +2385,5 @@
>             AC_DEFINE(MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES)
>         fi
> +       MMX_FLAGS="-mmmx"
> +       SSE_FLAGS="-msse"
> +       SSE2_FLAGS="-msse2"

Those should also be added to the mingw GNU_CC/CLANG_CC case around line 2050.

@@ +2407,5 @@
>      ;;
>  
>  esac
>  
> +AC_SUBST(MMX_FLAGS)

Please copy AC_SUBST_SET to AC_SUBST_LIST in build/autoconf/config.status.m4, make it use a list instead of a set, and use that here. Then use CONFIG['FOO_FLAGS'] as a list in the moz.build files.

::: content/base/src/moz.build
@@ +50,5 @@
>  # Are we targeting x86-32 or x86-64?  If so, we want to include SSE2 code for
>  # nsTextFragment.cpp
>  if CONFIG['INTEL_ARCHITECTURE']:
>      SOURCES += ['nsTextFragmentSSE2.cpp']
> +    SOURCES['nsTextFragmentSSE2.cpp'].flags += [CONFIG['SSE2_FLAGS']]

that is... += CONFIG['SSE2_FLAGS']

::: gfx/cairo/libpixman/src/moz.build
@@ +112,5 @@
>      DEFINES['USE_MMX'] = True
>      SOURCES += ['pixman-mmx.c']
>      if CONFIG['GNU_CC']:
>          SOURCES['pixman-mmx.c'].flags += [
> +            CONFIG['MMX_FLAGS'],

... += CONFIG['MMX_FLAGS'] + [

(or ... += CONFIG['MMX_FLAGS']
    ... += [)

etc.
Attachment #8388140 - Flags: review?(mh+mozilla) → feedback+
Attachment #8393259 - Flags: review?(mh+mozilla)
Comment on attachment 8393259 [details] [diff] [review]
Add global MMX_FLAGS, SSE_FLAGS and SSE2_FLAGS variables; r=glandium

Review of attachment 8393259 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/cairo/libpixman/src/moz.build
@@ +110,5 @@
>  if use_mmx:
>      DEFINES['USE_MMX'] = True
>      SOURCES += ['pixman-mmx.c']
>      if CONFIG['GNU_CC']:
> +        SOURCES['pixman-mmx.c'].flags += CONFIG['MMX_FLAGS']

This could move out of the condition (and would probably fix sun studio builds).

@@ +122,5 @@
>      DEFINES['USE_SSE'] = True
>      DEFINES['USE_SSE2'] = True
>      SOURCES += ['pixman-sse2.c']
>      if CONFIG['GNU_CC']:
> +        SOURCES['pixman-sse2.c'].flags += CONFIG['SSE_FLAGS'] + CONFIG['SSE2_FLAGS']

Likewise.

::: gfx/qcms/moz.build
@@ +40,5 @@
>  
>  if use_sse1:
>      SOURCES += ['transform-sse1.c']
>      if CONFIG['GNU_CC']:
> +        SOURCES['transform-sse1.c'].flags += CONFIG['SSE_FLAGS']

Likewise.

@@ +52,5 @@
>  
>  if use_sse2:
>      SOURCES += ['transform-sse2.c']
>      if CONFIG['GNU_CC']:
> +        SOURCES['transform-sse2.c'].flags += CONFIG['SSE2_FLAGS']

Likewise.

::: media/libspeex_resampler/src/moz.build
@@ +39,5 @@
>  if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['OS_TARGET'] != 'Android':
>      DEFINES['_USE_SSE'] = True
>      DEFINES['_USE_SSE2'] = True
>      if CONFIG['GNU_CC']:
> +        SOURCES['resample.c'].flags += CONFIG['SSE2_FLAGS']

Likewise.
Attachment #8393259 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/812c528dce3a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 986234
Depends on: 1023028
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: