Add lto and only use O2
because it works on gcc 11.3.0 but not on 12.2.0 With clang, its good
This commit is contained in:
parent
088639b3e6
commit
15b1f3421d
7
Makefile
7
Makefile
|
@ -2,10 +2,9 @@ MultiThread = Yes
|
||||||
HttpTorrent = Yes
|
HttpTorrent = Yes
|
||||||
InstallPrefix = /usr/local/bin
|
InstallPrefix = /usr/local/bin
|
||||||
|
|
||||||
PROGNAME = torrent-verify
|
PROGNAME := torrent-verify
|
||||||
CC = cc
|
CFLAGS := -Wall -std=gnu11 -I./subm/heapless-bencode -Werror -O2 -flto
|
||||||
CFLAGS = -Wall -std=gnu11 -I./subm/heapless-bencode -Werror -O3
|
CPPFLAGS := -DPROGRAM_NAME='"$(PROGNAME)"' -DBUILD_INFO \
|
||||||
CPPFLAGS = -DPROGRAM_NAME='"$(PROGNAME)"' -DBUILD_INFO \
|
|
||||||
-DBUILD_HASH="\"`git rev-parse --abbrev-ref HEAD` -> `git rev-parse --short HEAD`\"" -DBUILD_DATE="\"`date -I`\""
|
-DBUILD_HASH="\"`git rev-parse --abbrev-ref HEAD` -> `git rev-parse --short HEAD`\"" -DBUILD_DATE="\"`date -I`\""
|
||||||
|
|
||||||
ifeq ($(MultiThread), Yes)
|
ifeq ($(MultiThread), Yes)
|
||||||
|
|
|
@ -156,7 +156,8 @@ static int metainfo_http_progress(struct http_metainfo* h_meta) {
|
||||||
return CURL_PROGRESSFUNC_CONTINUE;
|
return CURL_PROGRESSFUNC_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int connect_cb(void* data, char*, char*, int, int) {
|
static int connect_cb(void* data, char* conn_ip, char* conn_local_ip,
|
||||||
|
int conn_port, int conn_local_port) {
|
||||||
struct http_metainfo* h_meta = data;
|
struct http_metainfo* h_meta = data;
|
||||||
if (!opt_silent)
|
if (!opt_silent)
|
||||||
clock_gettime(CLOCK_MONOTONIC_COARSE, &h_meta->progress.dlstart_time);
|
clock_gettime(CLOCK_MONOTONIC_COARSE, &h_meta->progress.dlstart_time);
|
||||||
|
|
Loading…
Reference in New Issue