X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFCC83871013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1614946723; bh=1HgsHvilNCg67RLZkWkmSmESoZUNvAgFNe7eFIhPZMQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GCaVfbr5C/WaGn4q7zkcIUTLeisK5HdoQ+0yBYEuhtGo8ubatnFmmdEUSKE7IkXfB /qxybrXWqs0dlnoTPyHbCrZozlSVQt4Wl+rnCWdaIDklpDyjq0bBIzJrjNprBvDcUy AxjD+VnVnKAclhHvLuZCjNDBJahflNT3eUVWzbyg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF5D2386F006 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=ekNvdXomNBOiEsH8N7C4TiskxkA5M3KD129NL0jWkLE=; b=rwQK+iycJBug47yzVK92YlGuPnGxow81F4Go0ktgGpasOJ3grzt7x+vUr+kOUckfbg A+KLkVsJQu3yWOWuW44K78idFbdbaVhX31930q0N+RVSiF5aZanOaDBl9RZ9eSxm3qD0 fKRps1+urxB40W3ZmtK1qqkKezVCoAHQCsg1ePPm5lifgJUrr9OwYXkol3PuwQ7aB1bK 8GCDGR563GYW7ubUYl81IIxKhIxiGAXFxk1hnaFT4NsnyOkypDoR3gCF9PXJybL2MVAg qfbYvgE+JBEnKljhenGUvQFh25hctbdKqXJ80/WzkEvlREfs1BDqJT/9ymkfo7ckpxpa i27g== X-Gm-Message-State: AOAM5319zfDKyBtpS6uy2ivfjEuKTMGHjOjabiEt7wTNgSCWjYcJdvod EIwRG/dL+5L2zcdNWCuQXGqWNFst1K/jMA== X-Google-Smtp-Source: ABdhPJxALRwCz//TWX5FzkqmWfHrkWr9iKKk1yxIjaxJDpVKEboksCUYu6JWrkF6ZVrH+P1wKxeRxw== X-Received: by 2002:a17:906:30da:: with SMTP id b26mr1958535ejb.376.1614946719941; Fri, 05 Mar 2021 04:18:39 -0800 (PST) To: "cygwin AT cygwin DOT com" Subject: stack grow direction wrongly detected Message-ID: <6eded5d3-93f3-7c98-5055-ee5ac2566bc8@gmail.com> Date: Fri, 5 Mar 2021 13:18:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 Content-Language: it X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Marco Atzeri via Cygwin Reply-To: Marco Atzeri Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" Hi Guys, noted trying to rebuild guile 1.8.8. The following piece of code in the past was setting SCM_I_GSC_STACK_GROWS_UP=0 and now produces SCM_I_GSC_STACK_GROWS_UP=1 I assume some change in the gcc compiler is causing the issue. I presume most of the programs and libraries do not care, but some special one like guile crashes during build for this issue, so be aware. Regards Marco #-------------------------------------------------------------------- # # Which way does the stack grow? # # Following code comes from Autoconf 2.61's internal _AC_LIBOBJ_ALLOCA # macro (/usr/share/autoconf/autoconf/functions.m4). Gnulib has # very similar code, so in future we could look at using that. # # An important detail is that the code involves find_stack_direction # calling _itself_ - which means that find_stack_direction (or at # least the second find_stack_direction() call) cannot be inlined. # If the code could be inlined, that might cause the test to give # an incorrect answer. #-------------------------------------------------------------------- SCM_I_GSC_STACK_GROWS_UP=0 AC_RUN_IFELSE([AC_LANG_SOURCE( [AC_INCLUDES_DEFAULT int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; }])], [SCM_I_GSC_STACK_GROWS_UP=1], [], [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h)]) -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple