Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Misc)  »  oh well: XP64 and C, among other things......
Page 1 of 1    

oh well: XP64 and C, among other things......

Author Message
Robbert Haarman...
Posted: Fri Jul 10, 2009 8:20 pm
Guest
On Fri, Jul 10, 2009 at 08:23:41AM -0700, BGB / cr88192 wrote:
Quote:
so, I installed XP64, lots of luck.
it sucked in 2005, but it doesn't suck now...


now, my initial results with MinGW-w64:
not very impressive...

this project would need a lot more work, such as:
having binaries which are both pre-built with MinGW and that also work;
maybe integrating the compiler into the framework as the native compiler;
from this stage, getting it self-hosting.

another issue:
I can't get it to build from sources.


Are you saying that MinGW-w64 doesn't work? The page at
http://mingw-w64.sourceforge.net/ gives a different impression...
 
BGB / cr88192...
Posted: Fri Jul 10, 2009 9:29 pm
Guest
"Robbert Haarman" <comp.lang.misc at (no spam) inglorion.net> wrote in message
news:20090710162051.GB4632 at (no spam) yoda.inglorion.net...
Quote:
On Fri, Jul 10, 2009 at 08:23:41AM -0700, BGB / cr88192 wrote:
so, I installed XP64, lots of luck.
it sucked in 2005, but it doesn't suck now...


now, my initial results with MinGW-w64:
not very impressive...

this project would need a lot more work, such as:
having binaries which are both pre-built with MinGW and that also work;
maybe integrating the compiler into the framework as the native compiler;
from this stage, getting it self-hosting.

another issue:
I can't get it to build from sources.


Are you saying that MinGW-w64 doesn't work? The page at
http://mingw-w64.sourceforge.net/ gives a different impression...


it only partly works...


it appears to basically be a cross-compiler setup, which means one would
have to compile everything as:
x86_64-pc-mingw32-gcc
....

ideally, it should be able to work just like good old 32-bit MinGW...

granted, these changes are mostly cosmetic, but matters of packaging and
cosmetics are not irrelevant, especially when it requires special care with
ones' makefiles or configure scripts to use it.

more or less, given the effort involved, I may well also support MSVC, which
at least I can be fairly certain has good and solid Windows support...


either way, I had started on the process of reworking my makefiles such that
both MinGW and MSVC can be used without too much additional effort...

FWIW, the same change would allow supporting MinGW-w64, ...


(as is, with my current setup, I would need several additional parallel
Makefile trees, which would suck...).
 
BGB / cr88192...
Posted: Sat Jul 11, 2009 5:18 am
Guest
"Robbert Haarman" <comp.lang.misc at (no spam) inglorion.net> wrote in message
news:20090710162051.GB4632 at (no spam) yoda.inglorion.net...
Quote:
On Fri, Jul 10, 2009 at 08:23:41AM -0700, BGB / cr88192 wrote:
so, I installed XP64, lots of luck.
it sucked in 2005, but it doesn't suck now...


now, my initial results with MinGW-w64:
not very impressive...

this project would need a lot more work, such as:
having binaries which are both pre-built with MinGW and that also work;
maybe integrating the compiler into the framework as the native compiler;
from this stage, getting it self-hosting.

another issue:
I can't get it to build from sources.


Are you saying that MinGW-w64 doesn't work? The page at
http://mingw-w64.sourceforge.net/ gives a different impression...


further testing implies they haven't yet run into some of the compiler
bugs...


granted, yes, this could be cool, but the project still needs a bit more
work IMO...

debugging and bringing the output more in conformance with MS's ABI wouldn't
hurt...


bug when compiling code:

char *BASM_Parse_Token(char *s, char *b, int *ty)
{
static char *token_ops[]={
"+++", "---", "==", "!=", "<=", ">=", "++", "--",
"<<", ">>", "(*", "*)", NULL};

char *t;
int i, j, k;

printf("%p\n", ty); //ty is clearly wrong by this point (ty==(int *)0x2B
here...)

....
}

....

char *BASM_ParseOpcode(BASM_Context *ctx, char *str)
{
char b[64], b2[64];
char *s, *t, *l0, *l1, *l2;
int ty, ty2;
int i, j;

long long disp0, disp1, disp2;
int br0, ir0, sc0;
int br1, ir1, sc1;
int br2, ir2, sc2;

printf("BASM_ParseOpcode 0\n");

// printf("%s", str);
printf("%p\n", &ty); //value is good here

s=BASM_Parse_Token(str, b, &ty); //here is where it calls...
BASM_Parse_Token(s, b2, &ty2);

...
}
 
Maxim S. Shatskih...
Posted: Sat Jul 11, 2009 2:21 pm
Guest
Quote:
additionally, Makefiles will work on MSVC,

Not all. MS's nmake is more primitive then GNU make and so lots of GNU makefiles will not work with MS's tools.

Anyway the tools are rich enough to build the whole Windows OS, so, they are rich enough for your project too.

Also, you can download Windows Driver Kit and use SOURCES (simplified makefile) instead of a full makefile.

Quote:
one is actually better off then just writing the "configure" portion as a
chunk of C code

autoconf/automake are the evil creations of the schizoid mind serving only a very minor practical purpose.

--
Maxim S. Shatskih
Windows DDK MVP
maxim at (no spam) storagecraft.com
http://www.storagecraft.com
 
BGB / cr88192...
Posted: Sat Jul 11, 2009 7:56 pm
Guest
"Maxim S. Shatskih" <maxim at (no spam) storagecraft.com.no.spam> wrote in message
news:h39p2p$sq4$1 at (no spam) news.mtu.ru...
Quote:
additionally, Makefiles will work on MSVC,

Not all. MS's nmake is more primitive then GNU make and so lots of GNU
makefiles will not
work with MS's tools.


yep...

I have found a workable option though:
make the GNU toolchain available from the 'CMD' shell, thus allowing me to
keep using GNU make...

other options may be considered later, but for now this works...


Quote:

Anyway the tools are rich enough to build the whole Windows OS, so, they
are rich enough for
your project too.


yep...

and, unlike with the current MinGW-w64, the bugs making it fail to work are
in MY code...
sadly, this process is slowed somewhat, as many subtle "gcc-isms" have
managed to silently invade my code, many of which blow up on MSVC...

there are periodic issues, mostly ones like:

void *p;

....
p=...
p=p+16; //oh crap... MSVC does not like doing pointer arith with 'void *'
....


however, much more severe are differences in the implicit "built in
macros...".

#ifdef WIN32
....
#endif

//oh crap, WIN32 does not use 'WIN32'...

so, yeah, I have partly made a special header which partly glosses over this
by transforiming some of the windows defines into gcc equivalents:

#ifdef _M_IX86
#ifndef __i386__
#define __i386__
#endif
#endif


Quote:
Also, you can download Windows Driver Kit and use SOURCES (simplified
makefile) instead
of a full makefile.


possibly...


actually, a mechanically-generated makefile could probably address some of
the issues I am having with nmake, just at present, I am not inclined to do
so.

others have been pointing out CMake, ...

(I still have to figure out how to make 'make clean' work, in a way which
does not backfire horribly...).


Quote:
one is actually better off then just writing the "configure" portion as
a
chunk of C code

autoconf/automake are the evil creations of the schizoid mind serving only
a very minor practical
purpose.


yep, yet people just, keep, damn, using it...



oh well, somehow I suspect building GCC on MSVC would be damn near
impossible...
 
Aaron Gray...
Posted: Wed Jul 22, 2009 3:34 am
Guest
"BGB / cr88192" <cr88192 at (no spam) hotmail.com> wrote in message
news:h37me0$enj$1 at (no spam) news.albasani.net...
Quote:
I guess 3/4 the effort with opensource software is getting it to build...
(heh... imagine trying to get GCC built on MSVC... probably isn't going to
happen...).

I did it with GCCPP ! :)

It was fun, NOT.

Aaron
 
Marco van de Voort...
Posted: Sat Jul 25, 2009 11:14 pm
Guest
On 2009-07-11, Maxim S. Shatskih <maxim at (no spam) storagecraft.com.no.spam> wrote:

Quote:
Anyway the tools are rich enough to build the whole Windows OS, so, they
are rich enough for your project too.

Hehe, if you believe that, the next time you build an house, remember with
what tools the pyramids were built Smile
 
BGB / cr88192...
Posted: Mon Jul 27, 2009 1:04 am
Guest
"Marco van de Voort" <marcov at (no spam) stack.nl> wrote in message
news:slrnh6n4fg.1s9p.marcov at (no spam) turtle.stack.nl...
Quote:
On 2009-07-11, Maxim S. Shatskih <maxim at (no spam) storagecraft.com.no.spam> wrote:

Anyway the tools are rich enough to build the whole Windows OS, so, they
are rich enough for your project too.

Hehe, if you believe that, the next time you build an house, remember with
what tools the pyramids were built :-)


yep...


and at this moment I am off trying to cross-translate masses of Java code
(the GNU classpath) into C, so that I can compile it all with MSVC into a
big DLL (that can be used with my projects...).

none the less, it is not made easy...

my translator too demonstrates its incredible buginess here, and gets caught
up in all the little edge cases that manage to exist here and there within
classpath...


I am having doubt it is all worth the effort...
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Dec 01, 2009 11:26 pm