Open the tool configuration dialog in the advanced menu.
Write your GCC command line used in the DOS window into the command line field. Instead of the name of source file which should be compiled use "%f" in the command line.
Enter a working directory or simply %p if path of source file should be the working directory.
Enter a name for the tool, for example Compile with GCC.
Activate "Save all files first" or only "Save Active File".
Select "Output to List Box" and check "Show DOS Box" and also "Capture Output". Press button "Insert" and the tool is ready to use now.
If you also want an icon for the User Tool 1, press button "Advanced" before button "Insert" and select a .bmp or .ico image with size 16x16 or 32x32.
More info about the user tools can be read in the help of UE. Simply press the Help button in the user tool configuration dialog.