--disable-threadsafe/--enable-threadsafe confusion in configure

RESOLVED FIXED in mozilla16

Status

()

Core
JavaScript Engine
--
minor
RESOLVED FIXED
8 years ago
5 years ago

People

(Reporter: Alex Earl, Assigned: terrence)

Tracking

Trunk
mozilla16
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
Build Identifier: tip

The configure.in file has the following:

AC_ARG_ENABLE(threadsafe,
              [  --enable-threadsafe     Enable support for multiple threads.],
              [AC_DEFINE(JS_THREADSAFE)],)

The AC_DEFINE(JS_THREADSAFE) is used even if --disable-threadsafe is called. The enableval is set to no, but the value is defined anyway. A solution which might work better is as follows:

AC_ARG_ENABLE(threadsafe,
  [  --enable-threadsafe     Enable support for multiple threads.],
  [if test "x$enableval" = "xyes"; then
  AC_DEFINE(JS_THREADSAFE)
fi],)

This checks the value of enableval to see if it is yes and only sets the define if it is yes.

Since threadsafe is disabled by default, it might also be good to show this in the --help listing.

Reproducible: Always

Steps to Reproduce:
1. Run autoconf2.13
2. Run ./configure --disable-threadsafe

Actual Results:  
grep for JS_THREADSAFE and it is defined in js-config.h to be 1

Expected Results:  
JS_THREADSAFE should not be defined at all

Comment 1

6 years ago
Yes, I can reproduce it. Regards to https://developer.mozilla.org/en/JS_THREADSAFE, JS_THREADSAFE is always on (and sources are really built with -DJS_THREADSAFE).

But without --enable-threadsafe config option the js-config.h file says JS_THREADSAFE is disabled.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

6 years ago
Version: unspecified → Trunk

Updated

6 years ago
Summary: --disable-threadsafe actually enables threadsafe → --disable-threadsafe/--enable-threadsafe confusion in configure
(Assignee)

Comment 2

5 years ago
Created attachment 634635 [details] [diff] [review]
v0: copied from comment
Assignee: general → terrence
Status: NEW → ASSIGNED
Attachment #634635 - Flags: review?(ted.mielczarek)
Attachment #634635 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e077c138cd5d
https://hg.mozilla.org/mozilla-central/rev/e077c138cd5d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.