From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C20C41F513 for ; Fri, 29 Dec 2023 17:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yhbt.net; s=selector1; t=1703872245; bh=XBG4k7NAkYfQTsamW5lkSbppty4wGnsXCHqBSzMTxOE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S4ff4V4cCJhVPvgiGu662stGOBpa6eEcs6dyOXZ30F9j89d75eRRjYpGqWcagL59j 32IYCS/X+fe4ASqlpmUf96KKC3W83Meyf+ulyZxsqePWBtXM6mOm/AiqTETyoMYDzr qG5wOfiD2ffrrFhQwndbdUCOeCAzKA8188WbNLvU= From: Eric Wong To: raindrops-public@yhbt.net Subject: [PATCH 3/4] extconf: disable optimization to speed up checks by ~3% Date: Fri, 29 Dec 2023 17:50:20 +0000 Message-ID: <20231229175021.17727-4-bofh@yhbt.net> In-Reply-To: <20231229175021.17727-1-bofh@yhbt.net> References: <20231229175021.17727-1-bofh@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Compiler optimization isn't useful when doing portability checks for any of the things we care about. --- ext/raindrops/extconf.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb index 1733703..b8f147c 100644 --- a/ext/raindrops/extconf.rb +++ b/ext/raindrops/extconf.rb @@ -1,6 +1,7 @@ require 'mkmf' require 'shellwords' +$CFLAGS += ' -O0 ' # faster checks dir_config('atomic_ops') have_func('mmap', 'sys/mman.h') or abort 'mmap() not found' have_func('munmap', 'sys/mman.h') or abort 'munmap() not found' @@ -158,4 +159,5 @@ apt-get install libatomic-ops-dev SRC create_header # generate extconf.h to avoid excessively long command-line +$CFLAGS.sub!(/ -O0 /, '') create_makefile('raindrops_ext')