summaryrefslogtreecommitdiff
path: root/Configure
Commit message (Collapse)AuthorAgeFilesLines
* Configure - fix handling of quoted gcc outputKurt Fitzner2023-01-311-1/+1
| | | | | | | | This patch was submitted in GH issue #20606. When gcc output contains quoted elements we fail to handle it properly. This tweaks the sed command to do so. Fixes #20606.
* Configure: Add various C99 compatibility improvementsFlorian Weimer2023-01-171-5/+11
| | | | | | | | | | | | | Two C99 compatibility issues are fixed by these changes: Return types are made explicit where they previously defaulted to int, and all called functions are now declared explicitly (either by including additional headers, or by adding prototypes manually). This avoids implict ints and implicit function declarations, both legacy C language features removed in the 1999 revision of the language. Verified with an instrumented GCC compiler on GNU/Linux.
* Add parameter types to declarations for clang-16Peter Levine2023-01-171-2/+2
| | | ANSI C style function declarations without parameter types are errors with clang-16.
* Figure out I32df, U32uf, etc. in Configure rather than in perl.hTAKAI Kousuke2022-11-141-0/+49
| | | | | | | | | | | | These macros were defined in perl.h using preprocessor conditionals, but determining wheter I32 is "int" or "long" is pretty hard with preprocessor, when INTSIZE == LONGSIZE. The Configure script should know exact underlying type of I32, so it should be able to determine whether %d or %ld shall be used to format I32 value more robustly. Various pre-configured files, such as uconfig.h, are updated to align with this.
* Configure: remove nsl from libswanteddanielnachun2022-09-031-1/+1
|
* Configure should avoid looping infinitely repeating the same questionNicholas Clark2022-08-021-0/+7
| | | | | | | | | | | | | | | Configure's helper function ./myread is intended to loop until it gets an acceptable answer. For a couple of cases, an empty string is not acceptable (eg 'Where is your C library?', if all automated attempts at answering this have failed). In these cases, if Configure's standard input is /dev/null (or closed), the shell read returns an empty string, and ./myread repeats the question. Before this commit, it would loop infinitely (generating continuous terminal output). With this commit, we add a retry counter - if it asks the same question to many times, it aborts Configure. This means that unattended ./Configure runs should now always terminate, as termination with an error is better than spinning forever.
* properly populate osvers on Dragonfly BSD when the hostname isn't setTony Cook2022-07-201-1/+4
| | | | | | | | | | | | | | A default installation of DragonflyBSD doesn't necessarily set the hostname, resulting in a `uname -a` like: DragonFly 6.2-RELEASE DragonFly v6.2.2-RELEASE ... which resulted in osvers being set to "dragonfly", which isn't especially useful. So check that $3 is numeric in some sense before using it, falling back to $2 if it isn't. This should only happen when the hostname isn't set.
* Configure: Add missing `#include <inttypes.h>` to test programsTAKAI Kousuke2022-07-201-0/+8
| | | | | | | With -Duse64bitint on 32-bit machines, UV might be configured to `uint64_t`. But some Configure tests used $uvtype without including <inttypes.h>, which may cause compilation error of those tests on sucn configurations, and eventually make perl not built correctly.
* Configure: Fix typos for C99 macro name PRIX64TAKAI Kousuke2022-07-201-1/+1
| | | | | | | There are no macros named PRIXU64. This line seems to date back to commit 6b356c8efb963846940ef92952cf77e5b86bd65e which renamed shell variable names to work well with case-insensitive systems, but could have overdone a bit.
* hide private functions with __attribute__((visibility("hidden")))Tomasz Konojacki2022-06-181-0/+30
| | | | | | | | This allows us to enforce API boundaries and potentially enables compiler optimisations. We've been always hiding non-public symbols on Windows. This commit brings that to the other platforms.
* Update libsearch paths for cygwinLeon Timmermans2022-06-141-0/+10
|
* probe for setenv in ConfigureTomasz Konojacki2022-05-291-0/+6
|
* Revert "Add Configure question for taint support"Paul "LeoNerd" Evans2022-05-191-43/+1
| | | | | | | | | This reverts commit 39f8eb4a21670e6b973dcfc86d0b1339064f5642. This is because of a variety of issues discussed #19657 and at the PSC meeting 064 2022-04-22 https://www.nntp.perl.org/group/perl.perl5.porters/2022/04/msg263670.html
* Add Configure question for taint supportNeil Bowers2022-04-201-1/+43
| | | | | | | | | | | | This adds a Configure question for whether you want taint support. It defaults to "yes", so that ./Configure -des will build a perl which supports taint in the usual way. If you say "no", then perl is compiled with -DSILENT_NO_TAINT_SUPPORT so that taint features silently do nothing. I've submitted a separate pull request on perl/metaconfig, which adds the underlying metaconfig unit for this question, which was used to build this Configure script.
* Fixed possible syntax error in Configure's test program for Inf/NaN bytes.TAKAI Kousuke2022-03-051-0/+2
| | | | | | "try.c" for (double|longdbl)(inf|nan)bytes seems to lack some preprocessor directives (probably accidentaly removed) and caused syntax error if HAS_LONG_DOUBLE is not defined.
* Regen Configure and friends after backportsH.Merijn Brand2021-10-291-165/+164
|
* Send bugs to GitHubJames E Keenan2021-10-131-3/+1
| | | | | Do not advise sending mail to 'perlbug@perl.org', as that now simply triggers a response redirecting sender to GitHub.
* Test declarations after statement in Configure's C99 probe codeNicholas Clark2021-10-131-4/+11
| | | | | | | | | | Also ensure that the relevant failure error message is output even with Configure's -s flag, as we shouldn't stay silent for a message that causes Configure default to aborting. With these changes, Configure will fail the C99 probe test if passed -Accflags="-Werror=declaration-after-statement" or -Accflags="-Werror=long-long"
* Teach Configure and cflags.SH about C99Nicholas Clark2021-10-131-0/+49
| | | | | | Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to compile. In cflags.SH, remove code that added gcc warning flags that were compatible with C89 but are not compatible with C99.
* A Configure test for C11 thread local storage specificer, _Thread_localNicholas Clark2021-09-071-0/+127
| | | | We also provbe for gcc's earlier syntax, __thread.
* detect struct stat.st_dev's size and signedness, and return it safelyTony Cook2021-09-011-0/+72
| | | | | | | | | | | | | | On FreeBSD dev_t (and hence the st_dev member of struct stat) is an unsigned 64-bit integer, and the previous simple PUSHi() corrupted that. A previous version of this reflected the st_ino code and implemented our own number to string conversion, but a system with such a large st_dev should be assumed to have inttypes.h, and an intmax_t which is no smaller than st_dev. The st_ino code could probably be changed similarly, but 64-bit inode numbers are not a new thing, so it may be riskier.
* Regen Configure and Glossary after backport of xlocale.h additionH.Merijn Brand2021-08-111-53/+53
|
* only #include <xlocale.h> when it is actually neededTony Cook2021-08-111-0/+50
| | | | | | | | | | | This header was originally only needed for builds on darwin and FreeBSD, but was being included whenever it was detected. This has caused problems when what was an internal header was removed (from glibc) and in general wasn't needed anyway. On FreeBSD only localeconv_l() requires xlocale.h, so we test specifically for that.
* Disambiguate what user sees in interactive ConfigureH.Merijn Brand2021-06-161-4/+4
| | | | | | | | | | | | User should expect to see configuration questions spelled 'UTF-8', not 'UTF8' (even if we store information internally or in config.sh without the hyphen). Correct user prompts accordingly. For: #18844 https://github.com/Perl/perl5/pull/18870 by @jkeenan
* Configure: apply recent metaconfig changesKarl Williamson2021-06-121-88/+112
| | | | Several new probes have been added.
* Configure changes for HAS_NON_INT_BITFIELDSKarl Williamson2021-06-121-0/+33
| | | | | | | | | | | This probe has been available without my realizing it had been merged. Some compilers, chiefly IBM, use only integer-size bitfields, warning when presented with other-sized ones. Allowing other-sized fields is an extension to the C standard. These warnings don't affect the correctness of the code generated, but very many are generated per run, potentially overwhelming the reader into not noticing warnings that are important.
* prevent undefined behaviour at a language level while probing getenvTony Cook2021-06-091-2/+2
| | | | | | | | | | | | | | | This test in Configure tries to probe for undefined behaviour in getenv(), but provokes undefined behaviour in C/C++ by falling off the end of a function with a non-void return type. Without optimization clang++ generated a ud2 instruction here on amd64 producing an illegal instruction exception. With optimization the test case fell off the end and started re-executing main(), eventually producing a SIGBUS. Simply dropping the value of getenv() here and returning NULL wasn't useful, under -O2 the compiler optimized away the getenv() call, voiding the whole point of the test.
* Sync Configure with META/DIST : >&4 changes and a typoH.Merijn Brand2021-05-311-10/+10
|
* Prevent incpath to spill into libpthH.Merijn Brand2021-04-161-6/+14
| | | | | | | | | | | | | | | | | • Use realpath if available • This might catch more duplicate paths • Only include real existing paths • Filter inc paths out of libpth Before: incpth: /usr/lib64/gcc/x86_64-suse-linux/7/include /usr/local/include /usr/lib64/gcc/x86_64-suse-linux/7/include-fixed /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include /usr/include libpth: /usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/7/include-fixed /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 After: incpth: /usr/lib64/gcc/x86_64-suse-linux/7/include /usr/local/include /usr/lib64/gcc/x86_64-suse-linux/7/include-fixed /usr/x86_64-suse-linux/include /usr/include libpth: /usr/local/lib /usr/x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib64 /usr/lib64 /lib /usr/local/lib64 If merged, I'll backport
* Reword usage messages, per review from TuxJames E Keenan2021-02-181-1/+1
|
* Provide examples for quoting shell wordsJames E Keenan2021-02-181-2/+2
| | | | | | Per suggestion by Andy Dougherty. For: https://github.com/Perl/perl5/issues/18573
* Regenerate Configure and frieds after backportH.Merijn Brand2021-02-141-19/+19
|
* Configure - test that gcvt/qgcvt are not buggy (Issue 18170)sisyphus2020-12-271-0/+15
|
* Add Configure probe for getenv() buffer raceKarl Williamson2020-12-191-0/+82
| | | | | | Most implementations do not have a problem with two getenv()'s running simultaneously in different threads. But Posix doesn't require such good behavior. This adds a simple probe to test the current system.
* Fix build on Haiku beta, set correct Haiku usrinc and locinc, add ↵Thibault DUPONCHELLE2020-09-291-14/+15
| | | | | | -fno-stack-protector to hints for amigaos.sh and haiku.sh (and disable accordingly -fstack-protector* in Configure)
* Add the Configure option to enable strict by default in perl programs.H.Merijn Brand2020-09-221-30/+30
| | | | | Integration of 19aaf9297b251db12d as metaconfig unit causes a re-order (as promised)
* Trap SIGBUS when Configure checks for va_copy (#18148)H.Merijn Brand2020-09-221-0/+3
| | | | | | | | | | | | | | On several systems the attempt to determine if we &quot;need va_copy() or similar&quot; results in a SIGBUS instead of a SIGSEGV because the fault happens pointing at an io device address. While reviewing accounting logs during the OpenBSD system build, bluhm@ noticed a core dump and deraadt@ tracked it down. While researching it was discovered that this is a fairly common case in other systems as well. Original diff by deraadt@
* Add the Configure option to enable strict by default in perl programs.Todd Rinaldo2020-09-151-0/+30
| | | | | | | | Do not set strict by default on -e or -E This is a development only feature to allow us to clean up blead. ./Configure -Dusedevel -des -Dusedefaultstrict
* Regenerate Configure after accepting PRH.Merijn Brand2020-09-021-2/+5
|
* Merge Configure changes for z/OS and AIXH.Merijn Brand2020-08-221-119/+188
| | | | Thank you Karl!
* Make getverlist inside Configure strict/warnings safe and correctly sortedH.Merijn Brand2020-08-211-18/+20
|
* Remove 5005threads vestiges from Configure and friendsDagfinn Ilmari Mannsåker2020-08-211-81/+4
| | | | See https://github.com/Perl/metaconfig/pull/66/
* A few small cleanups in ConfigureH.Merijn Brand2020-05-191-9/+0
| | | | Meta is now 100% in sync
* add Configure probe for struct sockaddr_storageTomasz Konojacki2020-05-191-0/+20
|
* Fix language referring to GitHub issue tracker in various placesDave Rolsky2020-03-141-1/+1
| | | | | | | | | | | | There were a number of spots that used language more appropriate for an email address than a web-based tracker. I noticed this because of the recent 5.30.2 release, which has a perldelta containing the sentence "If you find any we have missed, send email to https://github.com/Perl/perl5/issues." But I think that was because the 5.30.2 branch did not include 8166b4e0bc220e759aa233af54ac1e60cc510f0c.
* Configure: avoid here-doc in eval-ed snippetDagfinn Ilmari Mannsåker2020-01-211-4/+1
| | | | | | | | Some versions of bash, ksh and dash warn or error, complaining about unterminated here-docs, while some versions complain about syntax errors in unrelated parts of the script. This partially reverts commit 52635202f174c9387aa422c4aa32d12f754d8a33.
* Adapt Configure to GCC version 10Petr Písař2020-01-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I got a notice from Jeff Law <law@redhat.com>: Your particular package fails its testsuite. This was ultimately tracked down to a Configure problem. The perl configure script treated gcc-10 as gcc-1 and turned on -fpcc-struct-return. This is an ABI changing flag and caused Perl to not be able to interact properly with the dbm libraries on the system leading to a segfault. His proposed patch corrected only this one instance of the version mismatch. Reading the Configure script revealed more issues. This patch fixes all of them I found. Please note I do not have GCC 10 available, I tested it by faking the version with: --- a/Configure +++ b/Configure @@ -4672,7 +4672,7 @@ $cat >try.c <<EOM int main() { #if defined(__GNUC__) && !defined(__INTEL_COMPILER) #ifdef __VERSION__ - printf("%s\n", __VERSION__); + printf("%s\n", "10.0.0"); #else printf("%s\n", "1"); #endif (cherry picked from commit 6bd6308fcea3541e505651bf8e8127a4a03d22cd, which was accidentally reverted by commit e849841dca2a8b11119997585f795647c52cdcdf)
* Regen after backport syncingH.Merijn Brand2020-01-211-2/+6
|
* Include <stdio.h> in getpgrp/setpgrp probes for printf prototype.Andy Dougherty2019-12-291-0/+2
| | | | | C compilers typically issue a warning, but c++ compilers may abort with an error.
* Fix strtoll, strtoul, and strtouq probes to compile under clang++.Andy Dougherty2019-12-291-6/+6
| | | | | | | The test programs were missing the stdlib.h header, and needed tweaks to the check() prototype to compile under clang++. These changes should be fine for C compilers as well, but they have typically been more forgiving, so shouldn't be affected.