[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Broken commit e460f7dbb216
From: |
grischka |
Subject: |
Re: [Tinycc-devel] Broken commit e460f7dbb216 |
Date: |
Sat, 30 Jul 2022 11:02:39 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 28.07.2022 16:34, Detlef Riekenberg wrote:
Hi grischka.
Hi Detlef,
Please try to be more precise. For example, in your last commit,
you wrote:
"Do not fail with _Alignas(0) and _Alignas(1), used by autotools"
But there wasn't anything wrong with _Alignas(1), to begin with.
Also, the "(n > 1) &" part that you added in your one-line patch
- if (n <= 0 || (n & (n - 1)) != 0)
+ if (n < 0 || ((n > 1) & ((n & (n - 1)) != 0)))
is just redundant. Unnecessary redundancy confuses the readers, and
confused readers may add even more confusing stuff in sequence.
(Now I see that "(n > 1) &" has changed to "(n > 1) &&" which, well,
is still equally redundant.)
As to the "n < 0 ||" clause by the way. the C-standards seem to say:
"Alignments are represented as values of the type size_t. Valid alignments
include only fundamental alignments, plus an additional implementation-
defined set of values, which may be empty. Every valid alignment value
shall be a nonnegative integral power of two."
Well, when "size_t" means unsigned, how could it be not "nonnegative"
then ?!?
As to your "My local workaround" below (-DTCC_LIBTCC1="\"libtcc1.a\"")
all I can say is that it does not have any effect in the context of a
tinycc as it is available in the public repo.
Maybe you do have some local configuration hacks in place that may or
may not have been disturbed.
--- grischka
After your commit related to CONFIG_TCC_CROSSPREFIX,
every compiler failed to work on Linux.
I rechecked with a clean checkout.
Broken commit:
https://repo.or.cz/tinycc.git/commitdiff/e460f7dbb2165112bc618816ec15be312b257de2
Message examples:
repo.or.cz_tinycc$ ./tcc helloworld.c -o helloworld_tcc
In file included from helloworld.c:6:
/usr/include/stdio.h:33: error: include file 'stddef.h' not found
repo.or.cz_tinycc$ ./i386-tcc helloworld.c -o helloworld_tcc
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
In file included from helloworld.c:6:
/usr/include/stdio.h:33: error: include file 'stddef.h' not found
My local workaround:
diff --git a/Makefile b/Makefile
index 947f757..6d27eaf 100644
--- a/Makefile
+++ b/Makefile
@@ -175,10 +175,10 @@ DEFINES += $(DEF-$(or $(findstring win,$T),unx))
ifneq ($(X),)
ifeq ($(CONFIG_WIN32),yes)
-DEF-win += -DCONFIG_TCC_CROSSPREFIX="\"$X\""
-DEF-unx += -DCONFIG_TCC_CROSSPREFIX="\"lib/$X\""
+DEF-win += -DTCC_LIBTCC1="\"libtcc1.a\"" -DCONFIG_TCC_CROSSPREFIX="\"$X\""
+DEF-unx += -DTCC_LIBTCC1="\"libtcc1.a\"" -DCONFIG_TCC_CROSSPREFIX="\"lib/$X\""
else
-DEF-all += -DCONFIG_TCC_CROSSPREFIX="\"$X\""
+DEF-all += -DTCC_LIBTCC1="\"libtcc1.a\"" -DCONFIG_TCC_CROSSPREFIX="\"$X\""
DEF-win += -DCONFIG_TCCDIR="\"$(tccdir)/win32\""
endif
endif
And your patch is incomplete.
The cross prefix for libtcc1 is missing with -print-search-dirs
Can you please take a look?
Thanks
--
Bye bye ... Detlef
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel