Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
131 user(s) are online (91 user(s) are browsing Forums)

Members: 0
Guests: 131

more...

Headlines

Forum Index


Board index » All Posts (arfcarl)




Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Just popping in


@kas1e

Thanks. That should be okay I suppose.


Next question:

Linux has both CMSG_SPACE and CMSG_DATA as seen here: http://man7.org/linux/man-pages/man3/cmsg.3.html

But for Amiga it seems, according to socket.h, that only CMSG_DATA is supported?


c++ compiler suggests CMSG_DATA instead of CMSG_SPACE, but it can't be that simple I presume. The result is:

error: conversion from 'uint8_t*' {aka 'unsigned char*'} to 'unsigned int' in a converted constant expression
char cmsgbuf[CMSG_DATA(sizeof(int))];

Now on to see how much change of code this means.

Go to top


Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Just popping in


Next problem:


#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("PATH = %s\n", getenv("PATH"));
unsetenv("PATH");
return 0;
}


$ ppc-amigaos-g++ -athread=native unsetenv-test.cpp -o unsetenv-test
unsetenv-test.cpp: In function 'int main()':
unsetenv-test.cpp:7:3: error: 'unsetenv' was not declared in this scope
unsetenv("PATH");
^~~~~~~~
unsetenv-test.cpp:7:3: note: suggested alternative: 'setenv'
unsetenv("PATH");
^~~~~~~~
setenv


Why is setenv okay but not unsetenv?

Go to top


Re: QFtpServer - Ftp/ftps server for Qt4
Just popping in
Just popping in


Have you tried the new Zita FTP server? https://keasigmadelta.com/store/product/zitaftp-server/

There's a 30 days trial version to test before buying.

Go to top


Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Just popping in


Simple test:

#include <string>

int main()
{
std::to_string(0);
return 0;
}


$ ppc-amigaos-g++ to_string-test.cpp -o to_string-test
to_string-test.cpp: In function 'int main()':
to_string-test.cpp:5:10: error: 'to_string' is not a member of 'std'
std::to_string(0);
^~~~~~~~~


I will look into the hints given here:
https://stackoverflow.com/questions/12 ... ember-of-std-says-g-mingw



Edit:

Solved with these two steps:
1. https://github.com/sba1/adtools/issues/58#issuecomment-455441830
2. Added "-athread=native"


Now it compiles:
$ ppc-amigaos-g++ -athread=native to_string-test.cpp -o to_string-test

$ ppc-amigaos-readelf -h to_string-test
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: PowerPC
Version: 0x1
Entry point address: 0x10019bc
Start of program headers: 52 (bytes into file)
Start of section headers: 1132740 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 2
Size of section headers: 40 (bytes)
Number of section headers: 42
Section header string table index: 39


Edited by arfcarl on 2020/1/5 19:21:32
Go to top


Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Just popping in


@kas1e

Thanks. There’s already a Makefile. The source code is for x64/Linux (and Windows) and requires at least g++ 4.7 (C++11), I have 8.3 installed.

Go to top


Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Just popping in


$ ./configure --build=x86_64 --host=ppc-amigaos --target=ppc-amigaos
-bash: ./configure: No such file or directory


Can't find configure anywhere. Where should the config be located?

Go to top



TopTop
« 1 ... 3 4 5 (6)




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project