Closed Bug 834024 Opened 7 years ago Closed 7 years ago

Add -include $(DEPTH)/mozilla-config.h to ASFLAGS

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla21

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

In order to be able use stuff mozilla-config.h in files included by .S files we need this. I specifically ran into this in pixman with the neon files including pixman-private.h which was customized on MOZ_GFX_OPTIMIZE_MOBILE.

This has some weird quoting because in the first part of the string it wants to expand $ variables and in the second it doesn't.
Attachment #705597 - Flags: review?(ted)
Blocks: 828789
Comment on attachment 705597 [details] [diff] [review]
Add -include $(DEPTH)/mozilla-config.h to ASFLAGS

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

I think it would be better to use $_DEFINES_CFLAGS and to do that around where we set COMPILE_CFLAGS.
(In reply to Mike Hommey [:glandium] from comment #1)
> Comment on attachment 705597 [details] [diff] [review]
> Add -include $(DEPTH)/mozilla-config.h to ASFLAGS
> 
> Review of attachment 705597 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I think it would be better to use $_DEFINES_CFLAGS and to do that around
> where we set COMPILE_CFLAGS.

In this case we only want to add it to ASFLAGS when we're using gcc as the assembler.
Comment on attachment 705597 [details] [diff] [review]
Add -include $(DEPTH)/mozilla-config.h to ASFLAGS

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

I agree that we could do this in a more consistent manner, but this patch is so simple it seems silly to complicate it just for that goal. I have just one request.

::: configure.in
@@ +1420,4 @@
>      WARNINGS_AS_ERRORS='-Werror -Wno-error=uninitialized'
>      DSO_CFLAGS=''
>      DSO_PIC_CFLAGS='-fPIC'
> +    ASFLAGS="$ASFLAGS -fPIC "'-include $(DEPTH)/mozilla-config.h'

Can you shift this down a little bit to at least reuse $_DEFINES_CFLAGS where it's set?
Attachment #705597 - Flags: review?(ted) → review+
Assignee: nobody → jmuizelaar
https://hg.mozilla.org/mozilla-central/rev/9b83d7cff3f0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.