Bug 31875 - [gdb/build, python] gdb requires long long, while python-internal.h contains support for !HAVE_LONG_LONG
Summary: [gdb/build, python] gdb requires long long, while python-internal.h contains ...
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-10 16:15 UTC by Tom de Vries
Modified: 2024-06-10 21:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2024-06-10 16:15:02 UTC
According to this code in gdb/configure.ac, gdb requires long long support for building since gdb 7.7:
...
if test "$gdb_cv_c_long_long" != yes; then
  # libdecnumber requires long long.                                                                                  
  AC_MSG_ERROR([Compiler must support long long for GDB.])
fi
...
but AFAICT that's not documented anywhere (like, gdb/README).

That means we can simplify gdb/python/python-internal.h, which still contains code for !HAVE_LONG_LONG.
Comment 1 Tom Tromey 2024-06-10 20:03:08 UTC
Without looking at the older python configury, I guess
it's possible in theory that the platform compiler has
long long but somehow python was built without it?
Comment 2 Tom de Vries 2024-06-10 21:23:26 UTC
(In reply to Tom Tromey from comment #1)
> Without looking at the older python configury, I guess
> it's possible in theory that the platform compiler has
> long long but somehow python was built without it?

I suppose it's possible, indeed, but I'm not sure either whether that situation is properly supported in gdb now.

That is, if python doesn't define HAVE_LONG_LONG in pyport.h, but config.h does, I think it's still defined in python files, forcing the use of PY_LONG_LONG in python-internal.h, which will be undefined, which then should cause a compilation failure.

Either way, the situation looks like an exception, so even if it would work somehow, I'm not sure it's worth bothering with.