[issue44096] Bad clang detection in configure script

2021-05-09 Thread Rishav Kundu

New submission from Rishav Kundu :

Because autoconf detects `cc` before `clang` [1], this means that most of the 
checks in configure.ac that compare $CC to `clang` don’t work. This in turn 
means that things like LTO and PGO don’t work — the appropriate compiler 
options do not get set.

I can write a patch if someone can reproduce this.

[1]: 
https://www.gnu.org/software/autoconf/manual/autoconf-2.62/html_node/C-Compiler.html

--
components: Build
messages: 393354
nosy: xrisk
priority: normal
severity: normal
status: open
title: Bad clang detection in configure script

___
Python tracker 
<https://bugs.python.org/issue44096>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44093] compiler detection on macOS seems to be incorrect

2021-05-09 Thread Rishav Kundu

New submission from Rishav Kundu :

On macOS devices, the configure script seems to always detect gcc, even though 
Apple does not ship with gcc — the gcc binary is simply a wrapper around clang 
(probably llvm-gcc?)

I believe the issue is with these lines.

https://github.com/python/cpython/blob/8e8307d70bb9dc18cfeeed3277c076309b27515e/configure.ac#L630-L635

Concretely, gcc —-version produces this on my computer:

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr 
--with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Perhaps an additional check for “clang” would solve the issue.

--
components: Build
messages: 393346
nosy: xrisk
priority: normal
severity: normal
status: open
title: compiler detection on macOS seems to be incorrect
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue44093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar

2021-05-08 Thread Rishav Kundu


Change by Rishav Kundu :


--
keywords: +patch
nosy: +xrisk
nosy_count: 2.0 -> 3.0
pull_requests: +24652
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25999

___
Python tracker 
<https://bugs.python.org/issue43109>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu

Rishav Kundu  added the comment:

> perf_counter behavior during system suspend is undefined

Does the same apply for time.monotonic? I would argue that the difference in 
behavior between Linux/macOS and Windows is unreasonable; given that 
time.monotonic exists for measuring time intervals (which are not necessarily 
required to be of short duration – unlike perf_counter).

--

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu


Rishav Kundu  added the comment:

[1]: https://docs.python.org/3.8/library/time.html#time.clock_gettime

[2]: 
https://developer.apple.com/documentation/kernel/1646199-mach_continuous_time 
effectively uses CLOCK_MONOTONIC_RAW on macOS.

--

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu


Rishav Kundu  added the comment:

While I agree that the behavior of perf_counter should be consistent across 
macOS/Linux and Windows wrt system suspend, you can already access those clocks 
by using time.clock_gettime [1] with appropriate clock IDs (CLOCK_MONOTONIC_RAW 
on macOS and CLOCK_BOOTTIME on Linux)

--

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Rishav Kundu

Rishav Kundu  added the comment:

> Maybe a new clock is needed, clock which has a well defined behavior for 
> system suspend, on any platform.

I’d like to work on this, if possible. Linux and macOS support seems to be 
straightforward. I will have to look into other platforms.

What would be the protocol exactly? Should I float a discussion on the ideas 
mailing list? Open a new bpo?

--

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Rishav Kundu

Rishav Kundu  added the comment:

Wouldn’t using mach_continuous_time (and its equivalents on other platforms) 
wherever possible be preferable?

Or would a different API that distinguishes between clocks that track during 
suspend versus those that not be a better idea? Given that at least macOS and 
Linux offer both variants (not sure about Windows)

--

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-03 Thread Rishav Kundu


Change by Rishav Kundu :


--
keywords: +patch
nosy: +xrisk
nosy_count: 6.0 -> 7.0
pull_requests: +20862
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21719

___
Python tracker 
<https://bugs.python.org/issue41303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41410] Opening a file in binary mode makes a difference on all platforms in Python 3

2020-08-02 Thread Rishav Kundu


Rishav Kundu  added the comment:

Submitted a PR. Please let me know if I missed something :)

--

___
Python tracker 
<https://bugs.python.org/issue41410>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41410] Opening a file in binary mode makes a difference on all platforms in Python 3

2020-08-02 Thread Rishav Kundu


Change by Rishav Kundu :


--
keywords: +patch
nosy: +xrisk
nosy_count: 3.0 -> 4.0
pull_requests: +20844
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21701

___
Python tracker 
<https://bugs.python.org/issue41410>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com